artes 1.1.6 → 1.1.7
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 +1 -0
- package/cucumber.config.js +2 -0
- package/executer.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ npx artes [options]
|
|
|
51
51
|
| 📊 `-r, --report` | Run tests and generate Allure report | `artes -r` or `artes --report` |
|
|
52
52
|
| `--reportSuccess` | Add screenshots and video records for also Success test cases | `artes --reportSuccess`|
|
|
53
53
|
| 📁 `--features` | Specify one or more feature files' relative paths to run (comma-separated) | `artes --features "tests/features/Alma,tests/features/Banan.feature"` |
|
|
54
|
+
| 📜 `--stepDef` | Specify one or more step definition files' relative paths to use (comma-separated) | `artes --stepDef "tests/steps/login.js,tests/steps/home.js"` |
|
|
54
55
|
| 🔖 `--tags` | Run tests with specified Cucumber tags | `artes --tags "@smoke or @wip"` |
|
|
55
56
|
| 🌐 `--env` | Set the environment for the test run | `artes --env "dev"` |
|
|
56
57
|
| 🕶️ `--headless` | Run browser in headless mode | `artes --headless` |
|
package/cucumber.config.js
CHANGED
|
@@ -45,6 +45,8 @@ module.exports = {
|
|
|
45
45
|
? path.join(moduleConfig.projectPath, artesConfig.features)
|
|
46
46
|
: [moduleConfig.featuresPath], // Paths to feature files
|
|
47
47
|
require: [
|
|
48
|
+
process.env.STEP_DEFINITIONS ?
|
|
49
|
+
[path.join(moduleConfig.projectPath, process.env.STEP_DEFINITIONS)] :
|
|
48
50
|
artesConfig.steps
|
|
49
51
|
? path.join(moduleConfig.projectPath, artesConfig.steps)
|
|
50
52
|
: moduleConfig.stepsPath,
|
package/executer.js
CHANGED
|
@@ -19,6 +19,7 @@ const flags = {
|
|
|
19
19
|
reportSuccess: args.includes("--reportSuccess"),
|
|
20
20
|
trace: args.includes("-t") || args.includes("--trace"),
|
|
21
21
|
features: args.includes("--features"),
|
|
22
|
+
stepDef: args.includes("--stepDef"),
|
|
22
23
|
tags: args.includes("--tags"),
|
|
23
24
|
env: args.includes("--env"),
|
|
24
25
|
headless: args.includes("--headless"),
|
|
@@ -38,6 +39,7 @@ const flags = {
|
|
|
38
39
|
const env = args[args.indexOf("--env") + 1];
|
|
39
40
|
const featureFiles = args[args.indexOf("--features") + 1];
|
|
40
41
|
const features = flags.features && featureFiles;
|
|
42
|
+
const stepDef = args[args.indexOf("--stepDef") + 1];
|
|
41
43
|
const tags = args[args.indexOf("--tags") + 1];
|
|
42
44
|
const parallel = args[args.indexOf("--parallel") + 1];
|
|
43
45
|
const retry = args[args.indexOf("--retry") + 1];
|
|
@@ -66,6 +68,9 @@ flags.tags ? (process.env.RUN_TAGS = JSON.stringify(tags)) : "";
|
|
|
66
68
|
flags.features && console.log("Running features:", features);
|
|
67
69
|
flags.features ? (process.env.FEATURES = features) : "";
|
|
68
70
|
|
|
71
|
+
flags.stepDef && console.log("Running step definitions:", flags.stepDef);
|
|
72
|
+
flags.stepDef ? (process.env.STEP_DEFINITIONS = stepDef) : "";
|
|
73
|
+
|
|
69
74
|
flags.headless &&
|
|
70
75
|
console.log("Running mode:", flags.headless ? "headless" : "headed");
|
|
71
76
|
flags.headless ? (process.env.MODE = JSON.stringify(true)) : false;
|