@wdio/junit-reporter 7.16.13 → 7.17.3
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 +19 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +10 -10
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -179,7 +179,25 @@ outputFileFormat: function (options) {
|
|
|
179
179
|
Gives the ability to provide custom regex for formatting test suite name (e.g. in output xml ).
|
|
180
180
|
|
|
181
181
|
Type: `Regex`,<br />
|
|
182
|
-
Default: `/[^a-
|
|
182
|
+
Default: `/[^a-zA-Z0-9@]+/`
|
|
183
|
+
|
|
184
|
+
```js
|
|
185
|
+
// wdio.conf.js
|
|
186
|
+
module.exports = {
|
|
187
|
+
// ...
|
|
188
|
+
reporters: [
|
|
189
|
+
'dot',
|
|
190
|
+
['junit', {
|
|
191
|
+
outputDir: './',
|
|
192
|
+
suiteNameFormat: /[^a-zA-Z0-9@]+/
|
|
193
|
+
outputFileFormat: function(options) { // optional
|
|
194
|
+
return `results-${options.cid}.${options.capabilities}.xml`
|
|
195
|
+
}
|
|
196
|
+
}]
|
|
197
|
+
],
|
|
198
|
+
// ...
|
|
199
|
+
};
|
|
200
|
+
```
|
|
183
201
|
|
|
184
202
|
### addFileAttribute
|
|
185
203
|
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAc,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAGjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAOnD;;;;;GAKG;AACH,cAAM,aAAc,SAAQ,YAAY;IAQhB,OAAO,EAAE,oBAAoB;IAPjD,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAQ;IAC7B,OAAO,CAAC,gB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ter_1.default {
|
|
|
215
215
|
this._suiteTitleLabel = 'suiteName';
|
|
216
216
|
this._fileNameLabel = 'file';
|
|
217
217
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
218
|
+
runner.specs.forEach((specFileName) => {
|
|
219
|
+
if (isCucumberFrameworkRunner) {
|
|
220
|
+
this._buildOrderedReport(builder, runner, specFileName, 'feature', isCucumberFrameworkRunner);
|
|
221
|
+
this._buildOrderedReport(builder, runner, specFileName, 'scenario', isCucumberFrameworkRunner);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
this._buildOrderedReport(builder, runner, specFileName, '', isCucumberFrameworkRunner);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
227
|
return builder.build();
|
|
228
228
|
}
|
|
229
229
|
_buildOrderedReport(builder, runner, specFileName, type, isCucumberFrameworkRunner) {
|
|
@@ -236,7 +236,7 @@ class JunitReporter extends reporter_1.default {
|
|
|
236
236
|
continue;
|
|
237
237
|
}
|
|
238
238
|
const suite = this.suites[suiteKey];
|
|
239
|
-
if (isCucumberFrameworkRunner && suite.type === type) {
|
|
239
|
+
if (isCucumberFrameworkRunner && suite.type === type && specFileName === suite.file) {
|
|
240
240
|
builder = this._addCucumberFeatureToBuilder(builder, runner, specFileName, suite);
|
|
241
241
|
}
|
|
242
242
|
else if (!isCucumberFrameworkRunner) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/junit-reporter",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.17.3",
|
|
4
4
|
"description": "A WebdriverIO reporter that creates Jenkins compatible XML based JUnit reports",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-junit-reporter",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@types/json-stringify-safe": "^5.0.0",
|
|
28
28
|
"@types/validator": "^13.1.3",
|
|
29
|
-
"@wdio/reporter": "7.
|
|
30
|
-
"@wdio/types": "7.
|
|
29
|
+
"@wdio/reporter": "7.17.3",
|
|
30
|
+
"@wdio/types": "7.17.3",
|
|
31
31
|
"json-stringify-safe": "^5.0.1",
|
|
32
32
|
"junit-report-builder": "^3.0.0",
|
|
33
33
|
"validator": "^13.0.0"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2bcb589dbdd10ca181f301a269b4dd158faab257"
|
|
42
42
|
}
|