froth-webdriverio-framework 3.0.15 → 3.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@ const commonconfig = {
33
33
  try {
34
34
  console.log("Running suite:", suite.title);
35
35
  starttime = new Date().getTime();
36
-
36
+ console.log("Total Tests Defined in Suite:", totalTests);
37
37
  // const sessionId = browser.sessionId;
38
38
  // BUFFER.setItem("SESSION_ID", sessionId)
39
39
  if (isBrowserStackEnabled === true) {
@@ -77,6 +77,7 @@ const commonconfig = {
77
77
  */
78
78
  afterTest: async function (test, context, { error, result, duration, passed, retries }) {
79
79
  console.log(`Test '${test.title}' finished.`);
80
+
80
81
  const fileName = path.basename(test.file);
81
82
  console.log('Test File Name:', fileName);
82
83
  // BUFFER.setItem("FROTH_TOTAL_DURATION", Number(BUFFER.getItem("FROTH_TOTAL_DURATION")) + duration)
@@ -113,8 +114,22 @@ const commonconfig = {
113
114
  * @param {Array.<Object>} capabilities list of capabilities details
114
115
  * @param {Array.<String>} specs List of spec file paths that ran
115
116
  */
116
- after: async function (result, capabilities, specs) {
117
+ after: async function (result, config,capabilities, specs) {
117
118
  console.log('All tests are done.' + result);
119
+
120
+
121
+ const totalDefinedTests = config.specs.length; // Total test files/specs defined
122
+ const executedTests = result.finished; // Tests that were executed
123
+ const passedTests = result.passed;
124
+ const failedTests = result.failed;
125
+ const notRunTests = totalDefinedTests - executedTests;
126
+
127
+ console.log(`Total Defined Tests: ${totalDefinedTests}`);
128
+ console.log(`Executed Tests: ${executedTests}`);
129
+ console.log(`Passed Tests: ${passedTests}`);
130
+ console.log(`Failed Tests: ${failedTests}`);
131
+ console.log(`Tests Not Run: ${notRunTests}`);
132
+
118
133
  BUFFER.setItem("RESULT_DATA", result);
119
134
  console.log("result data :" + BUFFER.getItem("RESULT_DATA"))
120
135
  const resultdetails = {}
@@ -138,7 +153,7 @@ const commonconfig = {
138
153
 
139
154
  const resultdetails = {}
140
155
  resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
141
- console.log("Total Duration:" + BUFFER.getItem("FROTH_TOTAL_DURATION") === 0 ? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION")));
156
+ console.log("Total Duration:" + BUFFER.getItem("FROTH_TOTAL_DURATION") === 0 ? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION")));
142
157
  resultdetails.excution_time = BUFFER.getItem("FROTH_TOTAL_DURATION") === 0 ? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"))
143
158
  await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
144
159
  BUFFER.clear();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.15",
3
+ "version": "3.0.17",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",