froth-webdriverio-framework 5.0.9 → 5.0.10
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_api_calls/browsersatckSessionInfo.js +1 -1
- package/froth_common_actions/logData.js +1 -0
- package/froth_configs/commonconfig.js +36 -6
- package/package.json +3 -2
- package/allure-report/app.js +0 -2
- package/allure-report/data/attachments/5a44d93eb6bbc152.json +0 -3
- package/allure-report/data/attachments/8b4b70d43c5ef509.json +0 -1
- package/allure-report/data/attachments/f8f260f9d290c8dc.json +0 -3
- package/allure-report/data/behaviors.csv +0 -2
- package/allure-report/data/behaviors.json +0 -1
- package/allure-report/data/categories.csv +0 -2
- package/allure-report/data/categories.json +0 -1
- package/allure-report/data/packages.json +0 -1
- package/allure-report/data/suites.csv +0 -2
- package/allure-report/data/suites.json +0 -1
- package/allure-report/data/test-cases/eae527eca53ea9fc.json +0 -1
- package/allure-report/data/timeline.json +0 -1
- package/allure-report/export/influxDbData.txt +0 -14
- package/allure-report/export/mail.html +0 -10
- package/allure-report/export/prometheusData.txt +0 -14
- package/allure-report/favicon.ico +0 -0
- package/allure-report/history/categories-trend.json +0 -1
- package/allure-report/history/duration-trend.json +0 -1
- package/allure-report/history/history-trend.json +0 -1
- package/allure-report/history/history.json +0 -1
- package/allure-report/history/retry-trend.json +0 -1
- package/allure-report/index.html +0 -34
- package/allure-report/plugin/behaviors/index.js +0 -276
- package/allure-report/plugin/packages/index.js +0 -160
- package/allure-report/plugin/screen-diff/index.js +0 -200
- package/allure-report/plugin/screen-diff/styles.css +0 -30
- package/allure-report/styles.css +0 -5
- package/allure-report/widgets/behaviors.json +0 -1
- package/allure-report/widgets/categories-trend.json +0 -1
- package/allure-report/widgets/categories.json +0 -1
- package/allure-report/widgets/duration-trend.json +0 -1
- package/allure-report/widgets/duration.json +0 -1
- package/allure-report/widgets/environment.json +0 -1
- package/allure-report/widgets/executors.json +0 -1
- package/allure-report/widgets/history-trend.json +0 -1
- package/allure-report/widgets/launch.json +0 -1
- package/allure-report/widgets/retry-trend.json +0 -1
- package/allure-report/widgets/severity.json +0 -1
- package/allure-report/widgets/status-chart.json +0 -1
- package/allure-report/widgets/suites.json +0 -1
- package/allure-report/widgets/summary.json +0 -1
|
@@ -108,7 +108,7 @@ async function amend2Browserstack(annotationMessage, level) {
|
|
|
108
108
|
console.log("Annotation message inside amend2Browserstack:" + annotationMessage)
|
|
109
109
|
if (process.env.PLATFORM === 'browserstack')
|
|
110
110
|
await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
|
|
111
|
-
|
|
111
|
+
|
|
112
112
|
} catch (error) {
|
|
113
113
|
console.error('Error occurred while annoting to BS :', error);
|
|
114
114
|
throw error;
|
|
@@ -9,6 +9,7 @@ const exeDetails = require("../froth_api_calls/getexecutionDetails")
|
|
|
9
9
|
const { fail } = require("assert");
|
|
10
10
|
const { error } = require('console');
|
|
11
11
|
const HTMLReportGenerator = require('wdio-json-html-reporter').HTMLReportGenerator;
|
|
12
|
+
let Util;
|
|
12
13
|
|
|
13
14
|
//const isBrowserStackEnabled = process.env.BROWSERSTACK;
|
|
14
15
|
let starttime;
|
|
@@ -136,10 +137,9 @@ const commonconfig = {
|
|
|
136
137
|
|
|
137
138
|
if (process.env.PLATFORM === 'browserstack')
|
|
138
139
|
await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
|
|
139
|
-
else
|
|
140
|
-
{
|
|
140
|
+
else {
|
|
141
141
|
console.log("Local execution - no BrowserStack session details to fetch.");
|
|
142
|
-
|
|
142
|
+
// BUFFER.setItem("SESSION_ID", "local-session");
|
|
143
143
|
BUFFER.setItem("REPORT_URL", `./reports/${process.env.EXECUTION_ID}/test-report.html`);
|
|
144
144
|
//BUFFER.setItem("FROTH_TOTAL_DURATION", 0);
|
|
145
145
|
|
|
@@ -163,6 +163,36 @@ const commonconfig = {
|
|
|
163
163
|
console.log('==== BEFORE HOOK FOR MOBILE ====');
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
console.log("🔧 Initializing environment setup...");
|
|
167
|
+
|
|
168
|
+
// Define all possible locations of Utils.js
|
|
169
|
+
const possiblePaths = [
|
|
170
|
+
// 🟢 Cloud setup — npm installed inside project
|
|
171
|
+
path.resolve(process.cwd(), 'node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
172
|
+
|
|
173
|
+
// 🟢 Local setup — dependency folder outside project
|
|
174
|
+
path.resolve(process.cwd(), '../DEPENDENCY/node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
175
|
+
|
|
176
|
+
// 🟢 Another possible relative structure (if nested differently)
|
|
177
|
+
path.resolve(process.cwd(), '../../DEPENDENCY/node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
// Try to locate and load the Utils module
|
|
181
|
+
for (const filePath of possiblePaths) {
|
|
182
|
+
if (fs.existsSync(filePath + '.js')) {
|
|
183
|
+
Util = require(filePath);
|
|
184
|
+
global.Util = Util;
|
|
185
|
+
console.log(`✅ Utils loaded successfully from: ${filePath}`);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (!global.Util) {
|
|
191
|
+
console.error('❌ Could not find froth_common_actions/Utils in expected paths:');
|
|
192
|
+
possiblePaths.forEach(p => console.error(' - ' + p));
|
|
193
|
+
throw new Error('Failed to load Utils. Check dependency installation path.');
|
|
194
|
+
}
|
|
195
|
+
|
|
166
196
|
},
|
|
167
197
|
|
|
168
198
|
/**
|
|
@@ -365,10 +395,10 @@ const commonconfig = {
|
|
|
365
395
|
// return;
|
|
366
396
|
// }
|
|
367
397
|
|
|
368
|
-
|
|
398
|
+
// const latestJson = path.join(jsonFolder, jsonFiles[0].name);
|
|
369
399
|
//console.log(`🧩 Using JSON report: ${latestJson}`);
|
|
370
400
|
|
|
371
|
-
|
|
401
|
+
// const reportGenerator = new HTMLReportGenerator(outputFilePath, jsonFolder);
|
|
372
402
|
|
|
373
403
|
// Call your method (you can rename "generate" to whatever method your class exposes)
|
|
374
404
|
// reportGenerator.generate({
|
|
@@ -381,7 +411,7 @@ const commonconfig = {
|
|
|
381
411
|
|
|
382
412
|
console.log(`✅ HTML report generated: ${outputFilePath}`);
|
|
383
413
|
// If you want to include historical data, specify the history JSON file path here.
|
|
384
|
-
|
|
414
|
+
const historyFile = `./reports/${process.env.EXECUTION_ID}/history.json`; // Optional
|
|
385
415
|
|
|
386
416
|
// Optionally, generate aggregated history data before generating the HTML report.
|
|
387
417
|
// JSONReporter.generateAggregateHistory({ reportPaths: jsonFolder, historyPath: historyFile });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "froth-webdriverio-framework",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.10",
|
|
4
4
|
"readme": "WebdriverIO Integration",
|
|
5
5
|
"description": "WebdriverIO and BrowserStack App Automate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@wdio/allure-reporter": "^9.20.0",
|
|
29
|
-
"allure-commandline": "^2.34.1",
|
|
30
29
|
"@wdio/appium-service": "^9.0.9",
|
|
31
30
|
"@wdio/browserstack-service": "^9.0.9",
|
|
32
31
|
"@wdio/cli": "^9.0.9",
|
|
33
32
|
"@wdio/local-runner": "^9.0.9",
|
|
34
33
|
"@wdio/mocha-framework": "^8.36.1",
|
|
35
34
|
"@wdio/spec-reporter": "^8.36.1",
|
|
35
|
+
"allure-commandline": "^2.34.1",
|
|
36
36
|
"appium": "^2.15.0",
|
|
37
37
|
"appium-uiautomator2-driver": "^4.0.1",
|
|
38
38
|
"assert": "^2.1.0",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"deepmerge": "^4.3.1",
|
|
44
44
|
"express": "^5.1.0",
|
|
45
45
|
"form-data": "^4.0.0",
|
|
46
|
+
"froth-webdriverio-framework": "^5.0.9",
|
|
46
47
|
"fs": "^0.0.1-security",
|
|
47
48
|
"js-yaml": "^4.1.0",
|
|
48
49
|
"mysql2": "^3.10.2",
|