artes 1.0.81 โ†’ 1.0.83

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 CHANGED
@@ -284,6 +284,7 @@ You can configure Artes by editing the `artes.config.js` file. Below are the def
284
284
  | `require` | `[moduleConfig.stepsPath, "src/stepDefinitions/*.js", "src/hooks/hooks.js"]` | Support code paths (CommonJS). |
285
285
  | `pomPath` | `moduleConfig.pomPath` | Path to Page Object Models. |
286
286
  | `import` | `[]` | Support code paths. |
287
+ | `testPercentage` | `0` | Define test coverage percentage |
287
288
  | `format` | `["rerun:@rerun.txt", "allure-cucumberjs/reporter"]` | Formatter names/paths. |
288
289
  | `formatOptions` | `{ "resultsDir": "allure-result" }` | Formatter options. |
289
290
  | `parallel` | `1` | Number of parallel workers. |
@@ -18,7 +18,7 @@ module.exports = {
18
18
  default: {
19
19
  // File paths and patterns
20
20
  testPercentage: process.env.PERCENTAGE
21
- ? process.env.PERCENTAGE
21
+ ? Number(process.env.PERCENTAGE)
22
22
  : artesConfig.testPercentage || 0, // number - Percentage of tests to run (0-100)
23
23
  timeout: artesConfig.timeout || 30, // Default timeout in milliseconds
24
24
  paths: process.env.FEATURES
@@ -51,7 +51,7 @@ module.exports = {
51
51
 
52
52
  // Execution options
53
53
  parallel: process.env.PARALLEL
54
- ? JSON.parse(process.env.PARALLEL)
54
+ ? Number(process.env.PARALLEL)
55
55
  : artesConfig.parallel || 1, // Number of parallel workers
56
56
  dryRun: process.env.DRYRUN
57
57
  ? JSON.parse(process.env.DRYRUN)
package/executer.js CHANGED
@@ -51,13 +51,15 @@ function main() {
51
51
  // }
52
52
 
53
53
  if (flags.report) {
54
- runTests(args, flags);
54
+ const result = runTests(args, flags)
55
55
  generateReport();
56
56
  cleanUp();
57
- } else {
58
- runTests(args, flags);
59
- cleanUp();
60
- }
57
+ process.exit(result.status);
58
+ } else {
59
+ const result = runTests(args, flags);
60
+ cleanUp();
61
+ process.exit(result.status);
62
+ }
61
63
  }
62
64
 
63
65
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,6 +40,7 @@ function createProject(createYes) {
40
40
 
41
41
  // Configuration options:
42
42
  // env: "", // string - Environment name for tests
43
+ //testPercentage: 0, // number - Minimum success rate percentage(Default: 0)
43
44
  // baseURL: "", // string - Base URL for API tests
44
45
  // paths: [], // string[] - Paths to feature files
45
46
  // steps: "", // string - Step definitions files
@@ -34,11 +34,12 @@ function runTests(args, flags) {
34
34
  console.log("Running mode:", flags.headless ? "headless" : "headed");
35
35
  flags.headless ? (process.env.MODE = JSON.stringify(true)) : false;
36
36
 
37
- flags.parallel ? (process.env.PARALLEL = JSON.stringify(parallel)) : "";
37
+ flags.parallel ? (process.env.PARALLEL = parallel) : "";
38
38
  flags.retry ? (process.env.RETRY = JSON.stringify(retry)) : "";
39
39
  flags.dryrun ? (process.env.DRYRUN = JSON.stringify(true)) : "";
40
40
  flags.percentage ? (process.env.PERCENTAGE = percentage) : "";
41
-
41
+
42
+
42
43
  try {
43
44
  console.log("๐Ÿงช Running tests...");
44
45
  process.env.FORCE_COLOR = "1";
@@ -56,7 +57,7 @@ function runTests(args, flags) {
56
57
  },
57
58
  });
58
59
  console.log("โœ… Tests running completed successfully!");
59
- process.exit(result.status);
60
+ return result;
60
61
  } catch (error) {
61
62
  console.error("โŒ Test execution failed:", error);
62
63
  process.exit(1);