artes 1.6.2 → 1.6.4

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
@@ -4,7 +4,36 @@
4
4
 
5
5
  <h1 align="center">Artes</h1>
6
6
 
7
- ## 🚀 Summary
7
+ <p >
8
+ <a href="https://www.npmjs.com/package/artes">
9
+ <img src="https://img.shields.io/npm/dm/artes?label=npm&logo=npm&color=blue" alt="npm version">
10
+ </a>
11
+
12
+ <a href="https://github.com/4gayev1/Artes">
13
+ <img src="https://img.shields.io/badge/GitHub-Artes-181717?logo=github&logoColor=white" alt="GitHub Artes">
14
+ </a>
15
+
16
+ <a href="https://hub.docker.com/r/vahidaghayev/artes">
17
+ <img src="https://img.shields.io/badge/Docker-Artes-blue?logo=docker&logoColor=white" alt="Docker Artes">
18
+ </a>
19
+
20
+ <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">
21
+ <img src="https://img.shields.io/badge/JavaScript-F7DF1E?logo=javascript&logoColor=black" alt="JavaScript">
22
+ </a>
23
+
24
+ <a href="https://playwright.dev/">
25
+ <img src="https://img.shields.io/badge/Playwright-2EAD33?logo=playwright&logoColor=white" alt="Playwright">
26
+ </a>
27
+
28
+ <a href="https://cucumber.io/">
29
+ <img src="https://img.shields.io/badge/Cucumber-23D96C?logo=cucumber&logoColor=white" alt="Cucumber">
30
+ </a>
31
+
32
+ <a href="https://www.apache.org/licenses/LICENSE-2.0">
33
+ <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="Apache 2.0 License">
34
+ </a>
35
+
36
+ </p>
8
37
 
9
38
  Artes is a test runner for Playwright that executes [predefined Cucumber tests](./docs/stepDefinitions.md) and can generate Allure reports for test results. It simplifies setting up Playwright with Cucumber in your automation workflow. With Artes, you can easily run tests without writing step definitions, generate reports, and customize your testing environment.
10
39
 
@@ -20,7 +49,7 @@ Artes is a test runner for Playwright that executes [predefined Cucumber tests](
20
49
  - Well-structured, easy-to-follow documentation for a smooth learning curve
21
50
  - Designed for long-term maintainability and scalability
22
51
 
23
- ### 🧩 Powerful & Developer-Friendly Architecture
52
+ ### 🧩 Powerful & QA-Friendly Architecture
24
53
 
25
54
  - Intuitive API for writing custom step definitions
26
55
  - Rich set of ready-to-use step definitions to speed up test creation
@@ -115,12 +144,12 @@ npx artes [options]
115
144
  | `-rwt, --reportWithTrace` | Add trace to the report | `artes -rwt` or `artes --reportWithTrace` |
116
145
  | `--singleFileReport` | Generate single file allure report | `artes -r --singleFileReport` |
117
146
  | `--zip` | Zip the report folder after generation | `artes -r --zip` |
118
- | `--uploadReport` | Upload the generated report to Artes Reporting System | `artes --uploadReport --reporterURL "https://example.com"` |
119
- | `--reporterURL` | URL of the Artes Reporting System to upload the report | `artes --uploadReport --reporterURL "https://example.com"` |
120
- | `--projectName` | Name of the project in the Artes Reporting System (default: `"Artes Report"`) | `artes --uploadReport --reporterURL "https://example.com" --projectName "My Project"` |
121
- | `--projectType` | Type of the project for reporting purposes (default: `"Artes"`) | `artes --uploadReport --reporterURL "https://example.com" --projectType "API"` |
122
- | `--reportPath` | Path to the report zip file to upload (default: `./report.zip`) | `artes --uploadReport --reporterURL "https://example.com" --reportPath "./my_report.zip"` |
123
- | 🖼️ `--logo` | Set a custom logo in the report sidebar. Accepts an absolute path, a relative path, or a direct image URL | `artes --logo /abs/path/logo.png`<br>`artes --logo logo.png`<br>`artes --logo 'https://example.com/logo.png'` |
147
+ | `--uploadReport` | Upload the generated report to Artes Reporting System | `artes -r --zip --uploadReport --reporterURL "https://example.com"` |
148
+ | `--reporterURL` | URL of the Artes Reporting System to upload the report | `artes -r --zip --uploadReport --reporterURL "https://example.com"` |
149
+ | `--projectName` | Name of the project in the Artes Reporting System (default: `"Artes Report"`) | `artes -r --zip --uploadReport --reporterURL "https://example.com" --projectName "My Project"` |
150
+ | `--projectType` | Type of the project for reporting purposes (default: `"Artes"`) | `artes -r --zip --uploadReport --reporterURL "https://example.com" --projectType "API"` |
151
+ | `--reportPath` | Path to the report zip file to upload (default: `./report.zip`) | `artes -r --zip --uploadReport --reporterURL "https://example.com" --reportPath "./my_report.zip"` |
152
+ | 🖼️ `--logo` | Set a custom logo in the report sidebar. Accepts an absolute path, a relative path, or a direct image URL | `artes -r --logo /abs/path/logo.png`<br>`artes --logo logo.png`<br>`artes --logo 'https://example.com/logo.png'` |
124
153
  | 🏢 `--brandName` | Set the brand name displayed next to the logo in the report sidebar | `artes --brandName 'My Company'` |
125
154
  | 📄 `--reportName` | Report name displayed on the summary widget and in the Artes Reporting System | `artes --reportName 'Alma UI'`
126
155
  | 📁 `--features` | Specify one or more feature files' relative paths to run (comma-separated) | `artes --features "tests/features/Alma,tests/features/Banan.feature"` |
@@ -176,8 +205,8 @@ After running the `-c` flag to create a new project, the structure will look lik
176
205
  (Your feature files here)
177
206
  /POMs // Optional
178
207
  (POM JSON file here)
179
- /steps // For custom steps
180
- (Your step definition JS files here)
208
+ /steps // For custom steps and hooks
209
+ (Your step definition and hooks JS files here)
181
210
  artes.config.js
182
211
  /report
183
212
  (Generated Allure report HTML here)
@@ -631,6 +660,8 @@ Artes can generate Allure reports. After running tests with the `-r` flag, the r
631
660
 
632
661
  Artes has a built-in integration with the Artes Reporting System. By configuring the options below, you can automatically upload your test reports and keep your pipeline stages clean and organized.
633
662
 
663
+ *Note: report and zip should be true for report uploading*
664
+
634
665
  | **Option** | **Default Value** | **Description** |
635
666
  | ---------------- | ----------------------------- | ---------------------------------------------------------------------- |
636
667
  | `uploadReport` | `false` | Automatically upload the report to Artes Reporting System after tests. |
@@ -226,7 +226,7 @@ module.exports = {
226
226
  ? JSON.parse(process.env.MODE)
227
227
  : artesConfig?.headless !== undefined
228
228
  ? artesConfig.headless
229
- : true,
229
+ : false,
230
230
  slowMo: process.env.SLOWMO
231
231
  ? Number(process.env.SLOWMO) * 1000
232
232
  : artesConfig?.slowMo * 1000 || 0,
package/executer.js CHANGED
@@ -193,7 +193,7 @@ async function main() {
193
193
 
194
194
  const testCoverage = testCoverageCalculator();
195
195
 
196
- if (testCoverage.totalTests === 0) {
196
+ if (testCoverage?.totalTests === 0) {
197
197
  console.log("\x1b[33mNo tests were run (0 scenarios). Skipping report generation and upload.\x1b[0m");
198
198
  cleanUp();
199
199
  process.exit(process.env.EXIT_CODE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -60,6 +60,7 @@ function findDuplicateTestNames() {
60
60
  console.log("");
61
61
  });
62
62
  console.log("\x1b[0m");
63
+ console.log("");
63
64
  }
64
65
 
65
66
  return duplicates;
@@ -77,6 +77,7 @@ function logPomWarnings() {
77
77
  });
78
78
 
79
79
  console.log("\x1b[0m");
80
+ console.log("");
80
81
  }
81
82
 
82
83
  module.exports = { pomCollector, logPomWarnings };
@@ -68,11 +68,12 @@ function testCoverageCalculator({ silent = false } = {}) {
68
68
  });
69
69
 
70
70
  if (!silent && retriedTests.length > 0) {
71
- console.warn("\n\x1b[33mRetried test cases:");
71
+ console.warn(`\n\x1b[33mRetried test cases (${retriedTests.length} test cases):`);
72
72
  retriedTests.forEach((t) => {
73
73
  console.warn(`- "${t.scenario}" ran ${t.count} times`);
74
74
  });
75
75
  console.log("\x1b[0m");
76
+ console.log("");
76
77
  }
77
78
 
78
79
  return {
@@ -43,9 +43,8 @@ function createProject(createYes, noDeps) {
43
43
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
44
44
 
45
45
  const config = `module.exports = {
46
- headless: false, // Set to true for headless browser mode
47
-
48
46
  // Configuration options:
47
+ // headless: false, // Set to true for headless browser mode
49
48
  // env: "", // string - Environment name for tests
50
49
  // variables: {} // object - Variables for tests
51
50
  // testPercentage: 0, // number - Minimum success rate percentage(Default: 0)