artes 1.6.1 → 1.6.2
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/executer.js +35 -23
- package/package.json +1 -1
- package/src/helper/controller/getEnvInfo.js +4 -3
package/executer.js
CHANGED
|
@@ -191,12 +191,18 @@ async function main() {
|
|
|
191
191
|
|
|
192
192
|
runTests();
|
|
193
193
|
|
|
194
|
+
const testCoverage = testCoverageCalculator();
|
|
195
|
+
|
|
196
|
+
if (testCoverage.totalTests === 0) {
|
|
197
|
+
console.log("\x1b[33mNo tests were run (0 scenarios). Skipping report generation and upload.\x1b[0m");
|
|
198
|
+
cleanUp();
|
|
199
|
+
process.exit(process.env.EXIT_CODE);
|
|
200
|
+
}
|
|
201
|
+
|
|
194
202
|
logPomWarnings();
|
|
195
203
|
|
|
196
204
|
findDuplicateTestNames();
|
|
197
205
|
|
|
198
|
-
const testCoverage = testCoverageCalculator();
|
|
199
|
-
|
|
200
206
|
const testPercentage = process.env.PERCENTAGE
|
|
201
207
|
? Number(process.env.PERCENTAGE)
|
|
202
208
|
: artesConfig.testPercentage || 0;
|
|
@@ -229,16 +235,17 @@ async function main() {
|
|
|
229
235
|
fs.renameSync(source, destination);
|
|
230
236
|
}
|
|
231
237
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
if (
|
|
239
|
+
flags.reportWithTrace ||
|
|
240
|
+
artesConfig.reportWithTrace ||
|
|
241
|
+
flags.report ||
|
|
242
|
+
artesConfig.report
|
|
243
|
+
) {
|
|
244
|
+
getExecutor();
|
|
245
|
+
getEnvInfo();
|
|
246
|
+
generateReport();
|
|
247
|
+
}
|
|
248
|
+
|
|
242
249
|
|
|
243
250
|
if (
|
|
244
251
|
!(process.env.TRACE === "true"
|
|
@@ -251,18 +258,23 @@ async function main() {
|
|
|
251
258
|
});
|
|
252
259
|
}
|
|
253
260
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
261
|
+
try {
|
|
262
|
+
if (flags.uploadReport || artesConfig.uploadReport) {
|
|
263
|
+
await uploadReport({
|
|
264
|
+
reporterURL: reporterURL || artesConfig.reporterURL,
|
|
265
|
+
projectName: projectName || artesConfig.projectName || "Artes Report",
|
|
266
|
+
projectType: projectType || artesConfig.projectType || "Artes",
|
|
267
|
+
reportName: reportName || artesConfig.reportName || "Artes Report",
|
|
268
|
+
reportPath: reportPath || artesConfig.reportPath || path.join(process.cwd(), "report.zip")
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
} catch (err) {
|
|
272
|
+
console.error("Upload failed:", err.message);
|
|
273
|
+
} finally {
|
|
274
|
+
cleanUp();
|
|
275
|
+
process.exit(process.env.EXIT_CODE);
|
|
276
|
+
}
|
|
263
277
|
|
|
264
|
-
cleanUp();
|
|
265
|
-
process.exit(process.env.EXIT_CODE);
|
|
266
278
|
}
|
|
267
279
|
|
|
268
280
|
main();
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ async function getEnvInfo() {
|
|
|
16
16
|
baseURL = cucumberConfig.baseURL;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
let browserInfo = null;
|
|
19
20
|
if (fs.existsSync(path.join(moduleConfig.modulePath, "browser-info.json"))) {
|
|
20
21
|
browserInfo = JSON.parse(
|
|
21
22
|
fs.readFileSync(
|
|
@@ -44,8 +45,8 @@ async function getEnvInfo() {
|
|
|
44
45
|
|
|
45
46
|
// ── Browser ─────────────────────────────
|
|
46
47
|
Browser_Name: cucumberConfig.browser.browserType,
|
|
47
|
-
Browser_Version: browserInfo
|
|
48
|
-
Screen_Size: `w: ${browserInfo
|
|
48
|
+
Browser_Version: browserInfo?.BROWSER_VERSION ?? "N/A",
|
|
49
|
+
Screen_Size: `w: ${browserInfo?.BROWSER_WIDTH ?? "N/A"}px h:${browserInfo?.BROWSER_HEIGHT ?? "N/A"}px`,
|
|
49
50
|
Headless: cucumberConfig.browser.headless ?? "N/A",
|
|
50
51
|
|
|
51
52
|
// ── Test Config ─────────────────────────
|
|
@@ -83,4 +84,4 @@ async function getEnvInfo() {
|
|
|
83
84
|
return environment;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
module.exports = { getEnvInfo };
|
|
87
|
+
module.exports = { getEnvInfo };
|