Skip to content

Commit b9f70f4

Browse files
authored
docs(junit): document existing options and env (#30595)
1 parent fb90797 commit b9f70f4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/src/test-reporters-js.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ export default defineConfig({
263263
});
264264
```
265265

266+
JSON report supports following configuration options and environment variables:
267+
268+
| Environment Variable Name | Reporter Config Option| Description | Default
269+
|---|---|---|---|
270+
| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file path. | JSON report is printed to stdout.
271+
266272
### JUnit reporter
267273

268274
JUnit reporter produces a JUnit-style xml report.
@@ -293,6 +299,16 @@ export default defineConfig({
293299
});
294300
```
295301

302+
JUnit report supports following configuration options and environment variables:
303+
304+
| Environment Variable Name | Reporter Config Option| Description | Default
305+
|---|---|---|---|
306+
| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file path. | JUnit report is printed to stdout.
307+
| | `stripANSIControlSequences` | Whether to remove ANSI control sequences from the text before writing it in the report. | By default output text is added as is.
308+
| | `includeProjectInTestName` | Whether to include Playwright project name in every test case as a name prefix. | By default not included.
309+
| `PLAYWRIGHT_JUNIT_SUITE_ID` | | Value of the `id` attribute on the root `<testsuites/>` report entry. | Empty string.
310+
| `PLAYWRIGHT_JUNIT_SUITE_NAME` | | Value of the `name` attribute on the root `<testsuites/>` report entry. | Empty string.
311+
296312
### GitHub Actions annotations
297313

298314
You can use the built in `github` reporter to get automatic failure annotations when running in GitHub actions.

0 commit comments

Comments
 (0)