@testomatio/reporter 1.3.1-beta.5 β†’ 1.3.2-beta

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
@@ -12,7 +12,7 @@ Testomat.io Reporter (this npm package) supports:
12
12
  * πŸ„ Integarion with all popular [JavaScript/TypeScript frameworks](./docs/frameworks.md)
13
13
  * πŸ—„οΈ Screenshots, videos, traces [uploaded into S3 bucket](./docs/artifacts.md)
14
14
  * πŸ”Ž Stack traces and error messages
15
- * πŸ™ [GitHub](./docs/pipes.md#github-pipe) & [GitLab](./docs/pipes.md#gitlab-pipe) integration
15
+ * πŸ™ [GitHub](./docs/pipes/github.d) & [GitLab](./docs/pipes/gitlab.d) integration
16
16
  * πŸš… Realtime reports
17
17
  * πŸ—ƒοΈ Other test frameworks supported via [JUNit XML](./docs/junit.md)
18
18
  * πŸšΆβ€β™€οΈ Steps *(work in progress)*
@@ -85,13 +85,13 @@ or any [other via JUnit](./docs/junit.md) report....
85
85
 
86
86
  ### 2️⃣ Configure Reports
87
87
 
88
- * [Create report on Testomat.io](./docs/pipes.md#testomatio-pipe).
89
- * [Create brief summary report for GitHub Pull Request](./docs/pipes.md#github-pipe) πŸ‘‡
90
- * [Create brief summary report for GitLab Merge Request](./docs/pipes.md#gitlab-pipe).
91
- * [Configure other pipes](./docs/pipes.md) for other ways to process test results output.
88
+ * [Create report on Testomat.io](./docs/pipes/testomatio.md).
89
+ * [Create brief summary report for GitHub Pull Request](./docs/pipes/github.md) πŸ‘‡
90
+ * [Create brief summary report for GitLab Merge Request](./docs/pipes/gitlab.md).
91
+ * [Configure other pipes](./docs/pipes/md) for other ways to process test results output.
92
92
 
93
93
 
94
- ![GitHub report](./docs/images/github.png)
94
+ ![GitHub report](./docs/pipes/images/github.png)
95
95
 
96
96
  GitHub report published as a comment to Pull Request:
97
97
 
@@ -121,6 +121,10 @@ Bring this reporter on CI and never lose test results again!
121
121
 
122
122
  * πŸ› οΈ [Frameworks](./docs/frameworks.md)
123
123
  * β›² [Pipes](./docs/pipes.md)
124
+ * [Testomat.io](./docs/pipes/testomatio.md)
125
+ * [GitHub](./docs/pipes/github.md)
126
+ * [Gitlab](./docs/pipes/gitlab.md)
127
+ * [CSV](./docs/pipes/csv.md)
124
128
  * πŸ““ [JUnit](./docs/junit.md)
125
129
  * πŸ—„οΈ [Artifacts](./docs/artifacts.md)
126
130
  * πŸ”‚ [Workflows](./docs/workflows.md)
package/lib/client.js CHANGED
@@ -21,7 +21,6 @@ class Client {
21
21
  * @param {*} params
22
22
  */
23
23
  constructor(params = {}) {
24
- this.parallel = params.parallel;
25
24
  const store = {};
26
25
  this.uuid = randomUUID();
27
26
  this.pipes = pipesFactory(params, store);
@@ -40,17 +39,11 @@ class Client {
40
39
  // all pipes disabled, skipping
41
40
  if (!this.pipes?.filter(p => p.isEnabled).length) return Promise.resolve();
42
41
 
43
- const runParams = {
44
- title: this.title,
45
- parallel: this.parallel,
46
- env: this.env,
47
- };
48
-
49
42
  global.testomatioArtifacts = [];
50
43
  if (!global.testomatioDataStore) global.testomatioDataStore = {};
51
44
 
52
45
  this.queue = this.queue
53
- .then(() => Promise.all(this.pipes.map(p => p.createRun(runParams))))
46
+ .then(() => Promise.all(this.pipes.map(p => p.createRun())))
54
47
  .catch(err => console.log(APP_PREFIX, err))
55
48
  .then(() => undefined); // fixes return type
56
49
  // debug('Run', this.queue);
@@ -21,7 +21,7 @@ class GitHubPipe {
21
21
  this.token = params.GH_PAT || process.env.GH_PAT;
22
22
  this.ref = process.env.GITHUB_REF;
23
23
  this.repo = process.env.GITHUB_REPOSITORY;
24
- this.jobKey = `${process.env.GITHUB_WORKFLOW || ''} / ${process.env.GITHUB_JOB || ''}`
24
+ this.jobKey = `${process.env.GITHUB_WORKFLOW || ''} / ${process.env.GITHUB_JOB || ''}`;
25
25
  this.hiddenCommentData = `<!--- testomat.io report ${this.jobKey} -->`;
26
26
 
27
27
  debug('GitHub Pipe: ', this.token ? 'TOKEN' : '*no token*', 'Ref:', this.ref, 'Repo:', this.repo);
@@ -74,21 +74,29 @@ class GitHubPipe {
74
74
  let summary = `${this.hiddenCommentData}
75
75
 
76
76
  | [![Testomat.io Report](https://avatars.githubusercontent.com/u/59105116?s=36&v=4)](https://testomat.io) | ${
77
- statusEmoji(runParams.status,)} ${runParams.status.toUpperCase()} ${statusEmoji(runParams.status)} |
77
+ statusEmoji(runParams.status,)} ${`${process.env.GITHUB_JOB} ${runParams.status}`.toUpperCase()} |
78
78
  | --- | --- |
79
79
  | Tests | βœ”οΈ **${this.tests.length}** tests run |
80
- | Summary | ${failedCount ? `${statusEmoji('failed')} **${failedCount}** failed; `: ''} ${statusEmoji(
80
+ | Summary | ${failedCount ? `${statusEmoji('failed')} **${failedCount}** failed; ` : ''} ${statusEmoji(
81
81
  'passed',
82
82
  )} **${passedCount}** passed; **${statusEmoji('skipped')}** ${skippedCount} skipped |
83
- | Duration | πŸ• **${humanizeDuration(parseInt(this.tests.reduce((a, t) => a + (t.run_time || 0), 0), 10), {
84
- maxDecimalPoints: 0,
85
- })}** |`;
83
+ | Duration | πŸ• **${humanizeDuration(
84
+ parseInt(
85
+ this.tests.reduce((a, t) => a + (t.run_time || 0), 0),
86
+ 10,
87
+ ),
88
+ {
89
+ maxDecimalPoints: 0,
90
+ },
91
+ )}** |`;
86
92
 
87
93
  if (this.store.runUrl) {
88
94
  summary += `\n| Testomat.io Report | πŸ“Š [Run #${this.store.runId}](${this.store.runUrl}) | `;
89
95
  }
90
96
  if (process.env.GITHUB_WORKFLOW) {
91
- summary += `\n| Job | πŸ—‚οΈ [${this.jobKey}](${process.env.GITHUB_SERVER_URL || 'https://github.com'}/${this.repo}/actions/runs/${process.env.GITHUB_RUN_ID}) | `;
97
+ summary += `\n| Job | πŸ—‚οΈ [${this.jobKey}](${process.env.GITHUB_SERVER_URL || 'https://github.com'}/${
98
+ this.repo
99
+ }/actions/runs/${process.env.GITHUB_RUN_ID}) | `;
92
100
  }
93
101
  if (process.env.RUNNER_OS) {
94
102
  summary += `\n| Operating System | πŸ–₯️ \`${process.env.RUNNER_OS}\` ${process.env.RUNNER_ARCH || ''} | `;
@@ -27,6 +27,7 @@ class TestomatioPipe {
27
27
  return;
28
28
  }
29
29
  debug('Testomatio Pipe: Enabled');
30
+ this.parallel = params.parallel;
30
31
  this.store = store || {};
31
32
  this.title = params.title || process.env.TESTOMATIO_TITLE;
32
33
  this.sharedRun = !!process.env.TESTOMATIO_SHARED_RUN;
@@ -53,6 +54,7 @@ class TestomatioPipe {
53
54
 
54
55
  const runParams = Object.fromEntries(
55
56
  Object.entries({
57
+ parallel: this.parallel,
56
58
  api_key: this.apiKey.trim(),
57
59
  group_title: this.groupTitle,
58
60
  env: this.env,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.3.1-beta.5",
3
+ "version": "1.3.2-beta",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",
package/Changelog.md DELETED
@@ -1,264 +0,0 @@
1
- # 1.0.0
2
-
3
- <!-- pending release updates -->
4
-
5
- * Added [`TESTOMATIO_SHARED_RUN` option](https://github.com/testomatio/reporter/blob/master/docs/pipes.md#reporting-parallel-execution-to-to-same-run) to use a shared run for parallel executions
6
- * Reworked [documentation](https://github.com/testomatio/reporter/tree/master#readme).
7
- * Added an option to obtain [S3 configuration](https://github.com/testomatio/reporter/blob/master/docs/artifacts.md#configuration) from Testomat.io
8
- * Introduced [pipes](https://github.com/testomatio/reporter/blob/master/docs/pipes.md):
9
- * GitHub
10
- * GitLab
11
- * CSV Pipe
12
-
13
-
14
- # 0.7.6
15
-
16
- * Updated to use AWS S3 3.0 SDK for uploading
17
-
18
- # 0.7.5
19
-
20
- * Fixed reporting skipped tests in mocha
21
-
22
- # 0.7.4
23
-
24
- * Fixed parsing source code in JUnit files
25
-
26
- # 0.7.3
27
-
28
- * CodeceptJS: Upload all traces and videos from artifacts
29
- * Fixed reporting skipped test in XML
30
- * added `--timelimit` option to `report-xml` command line
31
-
32
- # 0.7.2
33
-
34
- * Fixed uploading non-existing file
35
-
36
- # 0.7.1
37
-
38
- * Support for NUnit XML v3 format
39
-
40
- # 0.7.0
41
-
42
- * Support for `@cucumber/cucumber` (>= 7.0) added
43
- * Initial support for C# and NUnit
44
-
45
- # 0.6.10
46
-
47
- * Fixed uploading multilpe artifacts in Playwright
48
-
49
- # 0.6.9
50
-
51
- * Fixed pending tests reports for Cypress
52
-
53
- # 0.6.8
54
- # 0.6.7
55
-
56
- * Pytest: fixed creating suites from reports
57
-
58
- # 0.6.6
59
-
60
- * JUnit reporter: prefer suite title over testcase classname in a report
61
-
62
- # 0.6.5
63
-
64
- * Fixed test statuses for runs in JUnit reporter
65
-
66
- # 0.6.4
67
-
68
- * Added `TESTOMATIO_PROCEED=1` param to not close current run
69
- * Fixed priority of commands from `npx @testomatio/reporter`
70
-
71
- # 0.6.3
72
-
73
- * Fixed `npx start-test-run` to launch commands
74
-
75
- # 0.6.2
76
-
77
- * Added `--env-file` option to load env variables from env file
78
-
79
- # 0.6.1
80
-
81
- * Fixed creating RunGroup with JUnit reporter
82
-
83
- # 0.6.0
84
-
85
- * JUnit reporter support
86
-
87
- # 0.5.10
88
-
89
- * Fixed reporting Scenario Outline in Cypress-Cucumber
90
- * Fixed error reports for Cypress when running in Chrome
91
-
92
- # 0.5.9
93
-
94
- * Added environment on Cypress report
95
-
96
- # 0.5.8
97
-
98
- * Fixed Cypress.io reporting
99
-
100
- # 0.5.7
101
-
102
- * Fixed webdriverio artifacts
103
-
104
- # 0.5.6
105
-
106
- * Unmark failed CodeceptJS tests as skipped
107
-
108
- # 0.5.5
109
-
110
- * Fixed `BeforeSuite` failures in CodeceptJS
111
-
112
- # 0.5.4
113
-
114
- Added `TESTOMATIO_CREATE=1` option to create unmatched tests on report
115
-
116
- ```
117
- TESTOMATIO_CREATE=1 TESTOMATIO=apiKey npx codeceptjs run
118
- ```
119
-
120
- # 0.5.3
121
-
122
- * Fixed parsing suites
123
-
124
- # 0.5.2
125
-
126
- * Fixed multiple upload of artifacts in Cypress.io
127
-
128
- # 0.5.1
129
-
130
- * Fixed Cypress.io to report tests inside nested suites
131
-
132
- # 0.5.0
133
-
134
- * Added Cypress.io plugin
135
- * Added artifacts upload to webdriverio
136
-
137
- # 0.4.6
138
-
139
- - Fixed CodeceptJS reporter to report tests failed in hooks
140
-
141
- # 0.4.5
142
-
143
- - Fixed "Total XX artifacts publicly uploaded to S3 bucket" when no S3 bucket is configured
144
- - Improved S3 connection error messages
145
-
146
- # 0.4.4
147
-
148
- - Fixed returning 0 exit code when a process fails when running tests in parallel via `start-test-run`. Previously was using the last exit code returned by a process. Currently prefers the highest exit code that was returned by a process.
149
-
150
- # 0.4.3
151
-
152
- - Added `TESTOMATIO_DISABLE_ARTIFACTS` env variable to disable publishing artifacts.
153
-
154
- # 0.4.2
155
-
156
- - print version of reporter
157
- - print number of uploaded artifacts
158
- - print access mode for uploaded artifacts
159
-
160
- # 0.4.1
161
-
162
- Added `global.testomatioArtifacts = []` array which can be used to add arbitrary artifacts to a report.
163
-
164
- ```js
165
- // inside a running test:
166
- global.testomatioArtifacts.push('file/to/upload.png');
167
- ```
168
-
169
- # 0.4.0
170
-
171
- - Playwright: Introduced playwright/test support with screenshots and video artifacts
172
-
173
- > Known issues: reporting using projects configured in Playwright does not work yet
174
-
175
- - CodeceptJS: added video uploads
176
-
177
- # 0.3.16
178
-
179
- - CodeceptJS: fixed reporting tests with empty steps (on retry)
180
-
181
- # 0.3.15
182
-
183
- - Finish Run via API:
184
-
185
- ```
186
- TESTOMATIO={apiKey} TESTOMATIO_RUN={runId} npx @testomatio/reporter@latest --finish
187
- ```
188
-
189
- # 0.3.14
190
-
191
- - Create an empty Run via API:
192
-
193
- ```
194
- TESTOMATIO={apiKey} npx @testomatio/reporter@latest --launch
195
- ```
196
-
197
- # 0.3.13
198
-
199
- - Checking for a valid report URL
200
- - Sending unlimited data on test report
201
-
202
- # 0.3.12
203
-
204
- - Fixed submitting arbitrary data on a test run
205
- - Jest: fixed sending errors with stack traces
206
- - Cypress: fixed sending reports
207
-
208
- # 0.3.11
209
-
210
- - Fixed circular JSON reference when submitting data to Testomatio
211
-
212
- # 0.3.10
213
-
214
- - Minor fixes
215
-
216
- # 0.3.9
217
-
218
- - Making all reporters to run without API key
219
-
220
- # 0.3.8
221
-
222
- - Fixed `npx start-test-run` to work with empty API keys
223
-
224
- # 0.3.7
225
-
226
- - Fixed release
227
-
228
- # 0.3.6
229
-
230
- - Update title and rungroup on start for scheduled runs.
231
-
232
- # 0.3.5
233
-
234
- - Added `TESTOMATIO_RUN` environment variable to pass id of a specific run to report
235
-
236
- # 0.3.4
237
-
238
- - Minor fixes
239
-
240
- # 0.3.3
241
-
242
- - [CodeceptJS] Fixed stack trace reporting
243
- - [CodeceptJS] Fixed displaying of nested steps
244
- - [CodeceptJS][mocha] Added assertion diff to report
245
-
246
- # 0.3.2
247
-
248
- - Fixed error message for S3 uploading
249
-
250
- # 0.3.1
251
-
252
- - [CodeceptJS] Better formatter for nested structures and BDD tests
253
-
254
- # 0.3.0
255
-
256
- - Added `TESTOMATIO_TITLE` env variable to set a name for Run
257
- - Added `TESTOMATIO_RUNGROUP_TITLE` env variable to attach Run to RunGroup
258
- - Added `TESTOMATIO_ENV` env variable to attach additional env values to report
259
- - [CodeceptJS] **CodeceptJS v3 support**
260
- - [CodeceptJS] Dropped support for CodeceptJS 2
261
- - [CodeceptJS] Added support for before hooks
262
- - [CodeceptJS] Log of steps
263
- - [CodeceptJS] Upload screenshots of failed tests to S3
264
- - [CodeceptJS] Updated to use with parallel execution