artes 1.7.19 → 1.7.21

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.
Files changed (49) hide show
  1. package/README.md +781 -781
  2. package/assets/styles.css +4 -4
  3. package/cucumber.config.js +253 -253
  4. package/docs/ciExecutors.md +198 -198
  5. package/docs/emulationDevicesList.md +152 -152
  6. package/docs/functionDefinitions.md +2401 -2401
  7. package/docs/stepDefinitions.md +435 -435
  8. package/executer.js +266 -266
  9. package/index.js +51 -51
  10. package/package.json +56 -56
  11. package/src/helper/contextManager/browserManager.js +74 -74
  12. package/src/helper/contextManager/requestManager.js +23 -23
  13. package/src/helper/controller/elementController.js +230 -230
  14. package/src/helper/controller/findDuplicateTestNames.js +69 -69
  15. package/src/helper/controller/getEnvInfo.js +97 -97
  16. package/src/helper/controller/getExecutor.js +109 -109
  17. package/src/helper/controller/pomCollector.js +83 -83
  18. package/src/helper/controller/reportCustomizer.js +511 -511
  19. package/src/helper/controller/screenComparer.js +96 -96
  20. package/src/helper/controller/status-formatter.js +137 -137
  21. package/src/helper/controller/testCoverageCalculator.js +111 -111
  22. package/src/helper/executers/cleaner.js +23 -23
  23. package/src/helper/executers/exporter.js +19 -19
  24. package/src/helper/executers/helper.js +193 -193
  25. package/src/helper/executers/projectCreator.js +226 -226
  26. package/src/helper/executers/reportGenerator.js +91 -91
  27. package/src/helper/executers/testRunner.js +28 -28
  28. package/src/helper/executers/versionChecker.js +31 -31
  29. package/src/helper/imports/commons.js +69 -69
  30. package/src/helper/stepFunctions/APIActions.js +582 -582
  31. package/src/helper/stepFunctions/assertions.js +986 -986
  32. package/src/helper/stepFunctions/browserActions.js +87 -87
  33. package/src/helper/stepFunctions/elementInteractions.js +60 -60
  34. package/src/helper/stepFunctions/exporter.js +19 -19
  35. package/src/helper/stepFunctions/frameActions.js +72 -72
  36. package/src/helper/stepFunctions/keyboardActions.js +66 -66
  37. package/src/helper/stepFunctions/mouseActions.js +84 -84
  38. package/src/helper/stepFunctions/pageActions.js +43 -43
  39. package/src/hooks/context.js +18 -18
  40. package/src/hooks/hooks.js +287 -287
  41. package/src/stepDefinitions/API.steps.js +404 -404
  42. package/src/stepDefinitions/assertions.steps.js +1358 -1351
  43. package/src/stepDefinitions/browser.steps.js +74 -74
  44. package/src/stepDefinitions/frameActions.steps.js +76 -76
  45. package/src/stepDefinitions/keyboardActions.steps.js +264 -264
  46. package/src/stepDefinitions/mouseActions.steps.js +374 -374
  47. package/src/stepDefinitions/page.steps.js +71 -71
  48. package/src/stepDefinitions/random.steps.js +199 -199
  49. package/src/stepDefinitions/report.steps.js +5 -5
@@ -1,194 +1,194 @@
1
- function showHelp() {
2
- console.log(`
3
- Artes CLI
4
-
5
- Usage:
6
- npx artes [options]
7
-
8
- Options:
9
- -h, --help Show this help message
10
- -v, --version Show current version of artes
11
- -c, --create Create example artes project
12
- -y, --yes Skip confirmation prompt when creating a project
13
- --noDeps Create project without installing dependencies
14
-
15
- For more options, use:
16
- artes report --help Reporting & branding options
17
- artes browser --help Browser & environment options
18
- artes execution --help Execution control options
19
- artes ai --help AI bug reporter options
20
- `);
21
- }
22
-
23
- function showReportingHelp() {
24
- console.log(`
25
- Artes CLI - Reporting & Branding
26
-
27
- Usage:
28
- npx artes [options]
29
-
30
- Options:
31
- -r, --report Run tests and generate Allure report
32
- Usage: artes -r or artes --report
33
-
34
- --reportSuccess Generate screenshot and video with successful tests too
35
- Usage: artes --reportSuccess
36
-
37
- -rwt, --reportWithTrace Include trace in the report
38
- Usage: artes --reportWithTrace
39
-
40
- --trace Enable tracing for all tests
41
- Usage: artes --trace
42
-
43
- --singleFileReport Generate single file Allure report
44
- Usage: artes -r --singleFileReport
45
-
46
- --zip Zip the report folder after generation
47
- Usage: artes -r --zip
48
-
49
- --logo Set a custom logo in the report sidebar
50
- Usage: artes --logo logo.png
51
-
52
- --brandName Set the brand name displayed next to the logo
53
- Usage: artes --brandName 'My Company'
54
-
55
- --reportName Report name on the summary widget
56
- Usage: artes --reportName 'Alma UI'
57
-
58
- --uploadReport Upload the generated report to Artes Reporting System
59
- Usage: artes --uploadReport --reporterURL "https://example.com/upload"
60
-
61
- --reporterURL URL of the Artes Reporting System
62
- Usage: artes --uploadReport --reporterURL "https://example.com/upload"
63
-
64
- --projectName Project name in the Artes Reporting System (default: "Artes Report")
65
- Usage: artes --uploadReport --reporterURL "https://example.com/upload" --projectName "My Project"
66
-
67
- --projectType Project type for reporting, e.g., UI, API (default: "Artes")
68
- Usage: artes --uploadReport --reporterURL "https://example.com/upload" --projectType "API"
69
-
70
- --reportPath Path to the report zip or html file to upload (default: ./report.zip)
71
- Usage: artes --uploadReport --reporterURL "https://example.com/upload" --reportPath "./my_report.zip"
72
- `);
73
- }
74
-
75
- function showBrowserHelp() {
76
- console.log(`
77
- Artes CLI - Browser & Environment
78
-
79
- Usage:
80
- npx artes [options]
81
-
82
- Options:
83
- --browser Specify browser to use (chromium, firefox, webkit)
84
- Usage: artes --browser chromium
85
-
86
- --device Emulate a specific device (e.g., "iPhone 13")
87
- Usage: artes --device "iPhone 13"
88
-
89
- --maxScreen Maximize browser window
90
- Usage: artes --maxScreen
91
-
92
- --width Set browser width (default: 1280)
93
- Usage: artes --width 1920
94
-
95
- --height Set browser height (default: 720)
96
- Usage: artes --height 1080
97
- `);
98
- }
99
-
100
- function showExecutionHelp() {
101
- console.log(`
102
- Artes CLI - Execution
103
-
104
- Usage:
105
- npx artes [options]
106
-
107
- Options:
108
-
109
- --headless Run browser in headless mode
110
- Usage: artes --headless
111
-
112
- --baseURL Set base URL for the tests
113
- Usage: artes --baseURL "https://example.com"
114
-
115
- --env Set environment for the test run
116
- Usage: artes --env "dev"
117
-
118
- --offline Run browser in offline mode
119
- Usage: artes --offline
120
-
121
- --features Specify feature file paths to run (comma-separated)
122
- Usage: artes --features "tests/features/Alma, tests/features/Banan.feature"
123
-
124
- --stepDef Specify step definition file paths to use (comma-separated)
125
- Usage: artes --stepDef "tests/steps/login.js, tests/steps/home.js"
126
-
127
- --tags Run tests with specified Cucumber tags
128
- Usage: artes --tags "@smoke and not @wip"
129
-
130
- --parallel Run tests in parallel mode
131
- Usage: artes --parallel 3
132
-
133
- --retry Retry failed tests
134
- Usage: artes --retry 2
135
-
136
- --rerun Rerun only failed tests from previous run
137
- Usage: artes --rerun @rerun.txt
138
-
139
- --dryRun Perform a dry run without executing tests
140
- Usage: artes --dryRun
141
-
142
- --percentage Set minimum success percentage to pass test run
143
- Usage: artes --percentage 85
144
-
145
- --timeout Set timeout for each test step (default: 30 seconds)
146
- Usage: artes --timeout 10
147
-
148
- --slowMo Slow down execution for clear view (default: 0)
149
- Usage: artes --slowMo 1
150
-
151
- --saveVar Set variables from CLI
152
- Usage: artes --saveVar '{"armud":20,"banana":200}'
153
- `);
154
- }
155
-
156
- function showAIHelp() {
157
- console.log(`
158
- Artes CLI - AI Bug Reporter
159
-
160
- Usage:
161
- npx artes [options]
162
-
163
- Options:
164
- --ai Enable AI-generated bug reports and test summaries
165
- Usage: artes --ai
166
-
167
- --aiModel AI model to use for report generation.
168
- (For supported AI models: https://github.com/4gayev1/Artes/blob/main/docs/aiProviders.md)
169
- Usage: artes --ai --aiModel "gemini 2.5 flash"
170
-
171
- --aiKey API key for the selected AI provider
172
- Usage: artes --ai --aiKey "your-api-key"
173
-
174
- --aiURL Local AI endpoint URL (e.g., Ollama, LM Studio). Overrides --aiModel and --aiKey when set
175
- Usage: artes --ai --aiURL "http://localhost:11434/api/chat"
176
-
177
- --aiLanguage Language for AI-generated reports (default: "English")
178
- Usage: artes --ai --aiLanguage "Azerbaijani"
179
-
180
- --maxTokens Maximum tokens for AI-generated reports (default: 4000)
181
- Usage: artes --ai --maxTokens 8000
182
-
183
- --maxReports Maximum number of AI reports to generate per test run (default: 10)
184
- Usage: artes --ai --maxReports 5
185
- `);
186
- }
187
-
188
- module.exports = {
189
- showHelp,
190
- showReportingHelp,
191
- showBrowserHelp,
192
- showExecutionHelp,
193
- showAIHelp
1
+ function showHelp() {
2
+ console.log(`
3
+ Artes CLI
4
+
5
+ Usage:
6
+ npx artes [options]
7
+
8
+ Options:
9
+ -h, --help Show this help message
10
+ -v, --version Show current version of artes
11
+ -c, --create Create example artes project
12
+ -y, --yes Skip confirmation prompt when creating a project
13
+ --noDeps Create project without installing dependencies
14
+
15
+ For more options, use:
16
+ artes report --help Reporting & branding options
17
+ artes browser --help Browser & environment options
18
+ artes execution --help Execution control options
19
+ artes ai --help AI bug reporter options
20
+ `);
21
+ }
22
+
23
+ function showReportingHelp() {
24
+ console.log(`
25
+ Artes CLI - Reporting & Branding
26
+
27
+ Usage:
28
+ npx artes [options]
29
+
30
+ Options:
31
+ -r, --report Run tests and generate Allure report
32
+ Usage: artes -r or artes --report
33
+
34
+ --reportSuccess Generate screenshot and video with successful tests too
35
+ Usage: artes --reportSuccess
36
+
37
+ -rwt, --reportWithTrace Include trace in the report
38
+ Usage: artes --reportWithTrace
39
+
40
+ --trace Enable tracing for all tests
41
+ Usage: artes --trace
42
+
43
+ --singleFileReport Generate single file Allure report
44
+ Usage: artes -r --singleFileReport
45
+
46
+ --zip Zip the report folder after generation
47
+ Usage: artes -r --zip
48
+
49
+ --logo Set a custom logo in the report sidebar
50
+ Usage: artes --logo logo.png
51
+
52
+ --brandName Set the brand name displayed next to the logo
53
+ Usage: artes --brandName 'My Company'
54
+
55
+ --reportName Report name on the summary widget
56
+ Usage: artes --reportName 'Alma UI'
57
+
58
+ --uploadReport Upload the generated report to Artes Reporting System
59
+ Usage: artes --uploadReport --reporterURL "https://example.com/upload"
60
+
61
+ --reporterURL URL of the Artes Reporting System
62
+ Usage: artes --uploadReport --reporterURL "https://example.com/upload"
63
+
64
+ --projectName Project name in the Artes Reporting System (default: "Artes Report")
65
+ Usage: artes --uploadReport --reporterURL "https://example.com/upload" --projectName "My Project"
66
+
67
+ --projectType Project type for reporting, e.g., UI, API (default: "Artes")
68
+ Usage: artes --uploadReport --reporterURL "https://example.com/upload" --projectType "API"
69
+
70
+ --reportPath Path to the report zip or html file to upload (default: ./report.zip)
71
+ Usage: artes --uploadReport --reporterURL "https://example.com/upload" --reportPath "./my_report.zip"
72
+ `);
73
+ }
74
+
75
+ function showBrowserHelp() {
76
+ console.log(`
77
+ Artes CLI - Browser & Environment
78
+
79
+ Usage:
80
+ npx artes [options]
81
+
82
+ Options:
83
+ --browser Specify browser to use (chromium, firefox, webkit)
84
+ Usage: artes --browser chromium
85
+
86
+ --device Emulate a specific device (e.g., "iPhone 13")
87
+ Usage: artes --device "iPhone 13"
88
+
89
+ --maxScreen Maximize browser window
90
+ Usage: artes --maxScreen
91
+
92
+ --width Set browser width (default: 1280)
93
+ Usage: artes --width 1920
94
+
95
+ --height Set browser height (default: 720)
96
+ Usage: artes --height 1080
97
+ `);
98
+ }
99
+
100
+ function showExecutionHelp() {
101
+ console.log(`
102
+ Artes CLI - Execution
103
+
104
+ Usage:
105
+ npx artes [options]
106
+
107
+ Options:
108
+
109
+ --headless Run browser in headless mode
110
+ Usage: artes --headless
111
+
112
+ --baseURL Set base URL for the tests
113
+ Usage: artes --baseURL "https://example.com"
114
+
115
+ --env Set environment for the test run
116
+ Usage: artes --env "dev"
117
+
118
+ --offline Run browser in offline mode
119
+ Usage: artes --offline
120
+
121
+ --features Specify feature file paths to run (comma-separated)
122
+ Usage: artes --features "tests/features/Alma, tests/features/Banan.feature"
123
+
124
+ --stepDef Specify step definition file paths to use (comma-separated)
125
+ Usage: artes --stepDef "tests/steps/login.js, tests/steps/home.js"
126
+
127
+ --tags Run tests with specified Cucumber tags
128
+ Usage: artes --tags "@smoke and not @wip"
129
+
130
+ --parallel Run tests in parallel mode
131
+ Usage: artes --parallel 3
132
+
133
+ --retry Retry failed tests
134
+ Usage: artes --retry 2
135
+
136
+ --rerun Rerun only failed tests from previous run
137
+ Usage: artes --rerun @rerun.txt
138
+
139
+ --dryRun Perform a dry run without executing tests
140
+ Usage: artes --dryRun
141
+
142
+ --percentage Set minimum success percentage to pass test run
143
+ Usage: artes --percentage 85
144
+
145
+ --timeout Set timeout for each test step (default: 30 seconds)
146
+ Usage: artes --timeout 10
147
+
148
+ --slowMo Slow down execution for clear view (default: 0)
149
+ Usage: artes --slowMo 1
150
+
151
+ --saveVar Set variables from CLI
152
+ Usage: artes --saveVar '{"armud":20,"banana":200}'
153
+ `);
154
+ }
155
+
156
+ function showAIHelp() {
157
+ console.log(`
158
+ Artes CLI - AI Bug Reporter
159
+
160
+ Usage:
161
+ npx artes [options]
162
+
163
+ Options:
164
+ --ai Enable AI-generated bug reports and test summaries
165
+ Usage: artes --ai
166
+
167
+ --aiModel AI model to use for report generation.
168
+ (For supported AI models: https://github.com/4gayev1/Artes/blob/main/docs/aiProviders.md)
169
+ Usage: artes --ai --aiModel "gemini 2.5 flash"
170
+
171
+ --aiKey API key for the selected AI provider
172
+ Usage: artes --ai --aiKey "your-api-key"
173
+
174
+ --aiURL Local AI endpoint URL (e.g., Ollama, LM Studio). Overrides --aiModel and --aiKey when set
175
+ Usage: artes --ai --aiURL "http://localhost:11434/api/chat"
176
+
177
+ --aiLanguage Language for AI-generated reports (default: "English")
178
+ Usage: artes --ai --aiLanguage "Azerbaijani"
179
+
180
+ --maxTokens Maximum tokens for AI-generated reports (default: 4000)
181
+ Usage: artes --ai --maxTokens 8000
182
+
183
+ --maxReports Maximum number of AI reports to generate per test run (default: 10)
184
+ Usage: artes --ai --maxReports 5
185
+ `);
186
+ }
187
+
188
+ module.exports = {
189
+ showHelp,
190
+ showReportingHelp,
191
+ showBrowserHelp,
192
+ showExecutionHelp,
193
+ showAIHelp
194
194
  };