froth-webdriverio-framework 3.0.142 → 3.0.144
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/commonconfig.js +11 -11
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { LocalStorage } = require('node-localstorage');
|
|
3
3
|
global.BUFFER = new LocalStorage('./storage');
|
|
4
|
+
global.suite_info = null;
|
|
4
5
|
const setAllDetails = require("./setallDatailinBuffer")
|
|
5
6
|
const exeDetails = require("../froth_api_calls/getexecutionDetails")
|
|
6
7
|
const getBSSessionDetails = require("../froth_api_calls/browsersatckSessionInfo").getBSSessionDetails;
|
|
@@ -14,7 +15,6 @@ const resultdetails = {
|
|
|
14
15
|
excution_status: 'SKIPPED', // Pass/Fail
|
|
15
16
|
excution_time: 0, // Execution time in milliseconds
|
|
16
17
|
};
|
|
17
|
-
let suite_info = null;
|
|
18
18
|
// Description: This file contains the common configuration for the webdriverio framework.
|
|
19
19
|
const commonconfig = {
|
|
20
20
|
|
|
@@ -46,7 +46,7 @@ const commonconfig = {
|
|
|
46
46
|
try {
|
|
47
47
|
console.log('==== BEFORE SESSION HOOK ====');
|
|
48
48
|
// Perform any setup or pre-test actions here
|
|
49
|
-
console.log("
|
|
49
|
+
console.log("DEBUG: Checking global.suite_info in beforeSession", JSON.stringify(suite_info, null, 2));
|
|
50
50
|
|
|
51
51
|
console.log("specdat:", specs);
|
|
52
52
|
console.log("length:", specs.length);
|
|
@@ -89,7 +89,7 @@ const commonconfig = {
|
|
|
89
89
|
beforeSuite: async function (suite) {
|
|
90
90
|
try {
|
|
91
91
|
console.log('==== BEFORE SUITE HOOK ====');
|
|
92
|
-
console.log("before suite Log - suite_info:", JSON.stringify(suite_info));
|
|
92
|
+
console.log("before suite Log - suite_info:", JSON.stringify(global.suite_info));
|
|
93
93
|
|
|
94
94
|
console.log(`====> Test suite has been started ' ${suite.title}' `,);
|
|
95
95
|
|
|
@@ -115,7 +115,7 @@ const commonconfig = {
|
|
|
115
115
|
beforeTest: async function (test, context) {
|
|
116
116
|
|
|
117
117
|
console.log('==== BEFORE TEST HOOK ====');
|
|
118
|
-
console.log("before test Log - suite_info:", JSON.stringify(suite_info));
|
|
118
|
+
console.log("before test Log - suite_info:", JSON.stringify(global.suite_info));
|
|
119
119
|
|
|
120
120
|
console.log(`====> Test Started '${test.title}'`);
|
|
121
121
|
|
|
@@ -136,7 +136,7 @@ const commonconfig = {
|
|
|
136
136
|
*/
|
|
137
137
|
afterTest: async function (test, context, { error, result, duration, passed, retries }) {
|
|
138
138
|
console.log('==== AFTER TEST HOOK ====');
|
|
139
|
-
console.log("after test Log - suite_info:", JSON.stringify(suite_info));
|
|
139
|
+
console.log("after test Log - suite_info:", JSON.stringify(global.suite_info));
|
|
140
140
|
|
|
141
141
|
console.log(`====> Test name finished '${test.title}'`);
|
|
142
142
|
|
|
@@ -162,9 +162,9 @@ const commonconfig = {
|
|
|
162
162
|
|
|
163
163
|
// scriptresult = "FAILED"
|
|
164
164
|
}
|
|
165
|
-
let suite_info1= JSON.stringify(suite_info);
|
|
165
|
+
let suite_info1= JSON.stringify(global.suite_info);
|
|
166
166
|
console.log("Second Log - suite_info:", suite_info1)
|
|
167
|
-
const jwtScript = suite_info.script_details.find(script => script.scriptName === fileName.replace(".js", ""));
|
|
167
|
+
const jwtScript = global.suite_info.script_details.find(script => script.scriptName === fileName.replace(".js", ""));
|
|
168
168
|
console.log("jwtScript:", jwtScript);
|
|
169
169
|
if (jwtScript) {
|
|
170
170
|
console.log("Script ID:", jwtScript.scriptId);
|
|
@@ -189,7 +189,7 @@ const commonconfig = {
|
|
|
189
189
|
*/
|
|
190
190
|
afterSuite: async function (suite) {
|
|
191
191
|
console.log('==== AFTER SUITE HOOK ====');
|
|
192
|
-
console.log("after suite Log - suite_info:", JSON.stringify(suite_info));
|
|
192
|
+
console.log("after suite Log - suite_info:", JSON.stringify(global.suite_info));
|
|
193
193
|
|
|
194
194
|
console.log(`====> Test suite has completed '${suite.title}'`);
|
|
195
195
|
},
|
|
@@ -202,7 +202,7 @@ const commonconfig = {
|
|
|
202
202
|
*/
|
|
203
203
|
after: async function (result, config, capabilities, specs) {
|
|
204
204
|
console.log('==== AFTER HOOK ====');
|
|
205
|
-
console.log("after Log - suite_info:", JSON.stringify(suite_info));
|
|
205
|
+
console.log("after Log - suite_info:", JSON.stringify(global.suite_info));
|
|
206
206
|
|
|
207
207
|
console.log('====> All tests are completed.' + result);
|
|
208
208
|
|
|
@@ -227,7 +227,7 @@ const commonconfig = {
|
|
|
227
227
|
|
|
228
228
|
afterSession: async function (config, capabilities, specs) {
|
|
229
229
|
console.log('==== AFTER SESSION HOOK ====');
|
|
230
|
-
console.log("after session Log - suite_info:", JSON.stringify(suite_info));
|
|
230
|
+
console.log("after session Log - suite_info:", JSON.stringify(global.suite_info));
|
|
231
231
|
|
|
232
232
|
console.log('====> This is the aftersession hook');
|
|
233
233
|
// Perform any cleanup or post-test actions here
|
|
@@ -265,7 +265,7 @@ const commonconfig = {
|
|
|
265
265
|
|
|
266
266
|
onComplete: async function (exitCode, config, capabilities, results) {
|
|
267
267
|
console.log('==== ON COMPLETE HOOK ====');
|
|
268
|
-
console.log("on complete Log - suite_info:", JSON.stringify(suite_info));
|
|
268
|
+
console.log("on complete Log - suite_info:", JSON.stringify(global.suite_info));
|
|
269
269
|
|
|
270
270
|
console.log('====> Results:', results);
|
|
271
271
|
|