artes 1.1.13 → 1.1.15
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/README.md +23 -0
- package/executer.js +2 -0
- package/package.json +1 -1
- package/src/helper/executers/helper.js +3 -0
- package/src/hooks/hooks.js +3 -3
package/README.md
CHANGED
|
@@ -338,6 +338,29 @@ Artes can generate Allure reports. After running tests with the `-r` flag, the r
|
|
|
338
338
|
|
|
339
339
|
---
|
|
340
340
|
|
|
341
|
+
## 🐳 Docker Image for CI/CD
|
|
342
|
+
|
|
343
|
+
A Docker image `vahidaghayev/artes` is available for running Artes in CI/CD pipelines. This image includes:
|
|
344
|
+
|
|
345
|
+
- **Playwright Browsers**: Pre-installed to support UI testing.
|
|
346
|
+
- **Xvfb**: Enables running UI tests with video recording in a virtual display.
|
|
347
|
+
|
|
348
|
+
### Recommended Settings for Best Quality
|
|
349
|
+
|
|
350
|
+
To achieve the best video recording quality, use the following command:
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
xvfb-run -a --server-args="-screen 0 3840x1180x24" --auto-servernum npx artes --width 1600 --height 900
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Playwright Version
|
|
357
|
+
|
|
358
|
+
The Docker image uses Playwright version `1.52.0`.
|
|
359
|
+
|
|
360
|
+
This setup ensures smooth execution of tests CI/CD environments.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
341
364
|
## 👍 Good To Use
|
|
342
365
|
|
|
343
366
|
If you don't use the -c or --create option that the package offers, save the file below under the `.vscode` folder:
|
package/executer.js
CHANGED
|
@@ -71,6 +71,8 @@ flags.features ? (process.env.FEATURES = features) : "";
|
|
|
71
71
|
flags.stepDef && console.log("Running step definitions:", flags.stepDef);
|
|
72
72
|
flags.stepDef ? (process.env.STEP_DEFINITIONS = stepDef) : "";
|
|
73
73
|
|
|
74
|
+
flags.trace ? (process.env.TRACE = true) : "";
|
|
75
|
+
|
|
74
76
|
flags.headless &&
|
|
75
77
|
console.log("Running mode:", flags.headless ? "headless" : "headed");
|
|
76
78
|
flags.headless ? (process.env.MODE = JSON.stringify(true)) : false;
|
package/package.json
CHANGED
|
@@ -30,6 +30,9 @@ function showHelp() {
|
|
|
30
30
|
|
|
31
31
|
📁 --features Specify one or more feature files' relative paths to run (comma-separated)
|
|
32
32
|
Usage: artes --features "tests/features/Alma, tests/features/Banan.feature"
|
|
33
|
+
|
|
34
|
+
📜 --stepDef Specify one or more step definition files' relative paths to use (comma-separated)
|
|
35
|
+
Usage: artes --stepDef "tests/steps/login.js, tests/steps/home.js"
|
|
33
36
|
|
|
34
37
|
🔖 --tags Run tests with specified Cucumber tags
|
|
35
38
|
Usage: artes --tags "@smoke and not @wip"
|
package/src/hooks/hooks.js
CHANGED
|
@@ -38,7 +38,7 @@ Before(async function () {
|
|
|
38
38
|
|
|
39
39
|
await context.page.setDefaultTimeout(cucumberConfig.default.timeout);
|
|
40
40
|
|
|
41
|
-
await context.browserContext.tracing.start({
|
|
41
|
+
process.env.TRACE && await context.browserContext.tracing.start({
|
|
42
42
|
sources: true,
|
|
43
43
|
screenshots: true,
|
|
44
44
|
snapshots: true,
|
|
@@ -93,7 +93,7 @@ After(async function ({ pickle, result }) {
|
|
|
93
93
|
"",
|
|
94
94
|
);
|
|
95
95
|
|
|
96
|
-
await context.browserContext.tracing.stop({
|
|
96
|
+
process.env.TRACE && await context.browserContext.tracing.stop({
|
|
97
97
|
path: path.join(moduleConfig.projectPath, "./trace.zip"),
|
|
98
98
|
});
|
|
99
99
|
|
|
@@ -146,7 +146,7 @@ AfterAll(async function () {
|
|
|
146
146
|
successPercentage.toFixed(2) >= cucumberConfig.default.testPercentage;
|
|
147
147
|
|
|
148
148
|
if (
|
|
149
|
-
cucumberConfig.default.testPercentage !=
|
|
149
|
+
cucumberConfig.default.testPercentage != undefined &&
|
|
150
150
|
!isNaN(successPercentage)
|
|
151
151
|
) {
|
|
152
152
|
if (successRate) {
|