froth-webdriverio-framework 4.0.41 → 4.0.42
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.
|
@@ -11,6 +11,7 @@ const { error } = require('console');
|
|
|
11
11
|
//const isBrowserStackEnabled = process.env.BROWSERSTACK;
|
|
12
12
|
let starttime;
|
|
13
13
|
let endtime;
|
|
14
|
+
let duration_tests=null;
|
|
14
15
|
console.log('===== common config===== ');
|
|
15
16
|
const resultdetails = {
|
|
16
17
|
comments: [],
|
|
@@ -165,6 +166,8 @@ const commonconfig = {
|
|
|
165
166
|
console.log('====> Test File Name:', fileName);
|
|
166
167
|
// BUFFER.setItem("FROTH_TOTAL_DURATION", Number(BUFFER.getItem("FROTH_TOTAL_DURATION")) + duration)
|
|
167
168
|
console.log(`====> Total Duration for this test: ${duration}ms`);
|
|
169
|
+
duration_tests += duration;
|
|
170
|
+
console.log(`====> Total Duration for all tests: ${duration_tests}ms`);
|
|
168
171
|
console.log(`====> Status of test: ${passed}`);
|
|
169
172
|
|
|
170
173
|
let scriptresult = "NOT RUN";
|
|
@@ -174,6 +177,7 @@ const commonconfig = {
|
|
|
174
177
|
if (passed) {
|
|
175
178
|
scriptresult = "PASSED"
|
|
176
179
|
resultdetails.comments.push(`${test.title} - passed`);
|
|
180
|
+
console.log(`====> resultdetails comments: ${resultdetails.comments}`);
|
|
177
181
|
}
|
|
178
182
|
else if (!finalPassed || error) {
|
|
179
183
|
scriptresult = "FAILED"
|
|
@@ -273,11 +277,15 @@ const commonconfig = {
|
|
|
273
277
|
endtime = new Date().getTime();
|
|
274
278
|
let totalDuration = endtime - starttime;
|
|
275
279
|
console.log("====> Total Duration in after session based on start time and end time:" + totalDuration);
|
|
276
|
-
|
|
280
|
+
console.log("====> Total Duration in after session based on start time and end time:" + duration_tests );
|
|
281
|
+
|
|
277
282
|
resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
|
|
283
|
+
|
|
278
284
|
console.log("====> Total Duration calculation:" + BUFFER.getItem("FROTH_TOTAL_DURATION") === null || BUFFER.getItem("FROTH_TOTAL_DURATION") === 0 || BUFFER.getItem("FROTH_TOTAL_DURATION") === undefined
|
|
279
|
-
? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION")));
|
|
280
|
-
|
|
285
|
+
? duration_tests === undefined || duration_tests === null ? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(duration_tests) : await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION")));
|
|
286
|
+
|
|
287
|
+
resultdetails.excution_time = BUFFER.getItem("FROTH_TOTAL_DURATION") === null || BUFFER.getItem("FROTH_TOTAL_DURATION") === 0 || BUFFER.getItem("FROTH_TOTAL_DURATION") === undefined
|
|
288
|
+
? duration_tests === undefined || duration_tests === null ? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(duration_tests) : await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"))
|
|
281
289
|
|
|
282
290
|
await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
|
|
283
291
|
BUFFER.clear();
|