froth-webdriverio-framework 6.0.64 → 6.0.65
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.
- package/froth_configs/commonhook.js +14 -19
- package/package.json +1 -1
|
@@ -222,13 +222,21 @@ const commonHooks = {
|
|
|
222
222
|
resultdetails.excution_time = msToTime(Math.max(totalTime, totalTestDuration));
|
|
223
223
|
|
|
224
224
|
console.log('⏱ Final execution time:', resultdetails.excution_time);
|
|
225
|
-
// Capture WebDriver session failures
|
|
226
|
-
// if (exitCode !== 0) {
|
|
227
|
-
// resultdetails.comments.push(`❌ WebDriver session failed or timed out (exit code ${exitCode})`);
|
|
228
|
-
// }
|
|
229
225
|
|
|
230
|
-
|
|
231
|
-
|
|
226
|
+
resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
|
|
227
|
+
|
|
228
|
+
if (exitCode !== 0) {
|
|
229
|
+
resultdetails.comments.push(
|
|
230
|
+
`❌ Execution failed with exit code ${exitCode}`
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
console.log('📤 Updating DB with final execution details');
|
|
235
|
+
console.log('Status:', resultdetails.excution_status);
|
|
236
|
+
console.log('Duration:', resultdetails.excution_time);
|
|
237
|
+
|
|
238
|
+
await safeUpdateExecution();
|
|
239
|
+
BUFFER.clear();
|
|
232
240
|
},
|
|
233
241
|
|
|
234
242
|
/* ========== ON ERROR ========== */
|
|
@@ -254,20 +262,7 @@ const commonHooks = {
|
|
|
254
262
|
onComplete: async (exitCode, _, __, results) => {
|
|
255
263
|
console.log('==== ON COMPLETE ====');
|
|
256
264
|
console.log(`Total: ${results.total}, Passed: ${results.passed}, Failed: ${results.failed}`);
|
|
257
|
-
resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
|
|
258
|
-
|
|
259
|
-
if (exitCode !== 0) {
|
|
260
|
-
resultdetails.comments.push(
|
|
261
|
-
`❌ Execution failed with exit code ${exitCode}`
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
265
|
|
|
265
|
-
console.log('📤 Updating DB with final execution details');
|
|
266
|
-
console.log('Status:', resultdetails.excution_status);
|
|
267
|
-
console.log('Duration:', resultdetails.excution_time);
|
|
268
|
-
|
|
269
|
-
await safeUpdateExecution();
|
|
270
|
-
BUFFER.clear();
|
|
271
266
|
return exitCode;
|
|
272
267
|
},
|
|
273
268
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "froth-webdriverio-framework",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.65",
|
|
4
4
|
"readme": "WendriverIO Integration with [BrowserStack](https://www.browserstack.com)",
|
|
5
5
|
"description": "Selenium examples for WebdriverIO and BrowserStack App Automate",
|
|
6
6
|
"scripts": {
|