From ba10db3e7f4f398cd5e47f555f1a5d631d6af4d0 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 29 Apr 2024 11:13:35 -0700 Subject: [PATCH 1/4] docs(junit): document existing options and env --- docs/src/test-reporters-js.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/src/test-reporters-js.md b/docs/src/test-reporters-js.md index cd54d4a5d101a..c2631b8ec6c72 100644 --- a/docs/src/test-reporters-js.md +++ b/docs/src/test-reporters-js.md @@ -293,6 +293,16 @@ export default defineConfig({ }); ``` +JUnit report supports following configuration options and environment variables: + +| Environment Variable Name | Reporter Config Option| Description | Default +|---|---|---|---| +| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file name. | If none of the options specified, JUnit report is printed to stdout. +| | `stripANSIControlSequences` | Wether to remove ANSI control sequences from the text before writing it in the report. | By default output text is added as is. +| | `includeProjectInTestName` | Whether to include Playwright project name in every test case as a name prefix. | By default not included. +| `PLAYWRIGHT_JUNIT_SUITE_ID` | | Value of the `id` attribute on the root `` report entry. | Empty string. +| `PLAYWRIGHT_JUNIT_SUITE_NAME` | | Value of the `name` attribute on the root `` report entry. | Empty string. + ### GitHub Actions annotations You can use the built in `github` reporter to get automatic failure annotations when running in GitHub actions. From 507d3755e8b299a774840bf11c803f275000705b Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 29 Apr 2024 11:16:00 -0700 Subject: [PATCH 2/4] Remove extra words --- docs/src/test-reporters-js.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/test-reporters-js.md b/docs/src/test-reporters-js.md index c2631b8ec6c72..16d7839be08a5 100644 --- a/docs/src/test-reporters-js.md +++ b/docs/src/test-reporters-js.md @@ -297,7 +297,7 @@ JUnit report supports following configuration options and environment variables: | Environment Variable Name | Reporter Config Option| Description | Default |---|---|---|---| -| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file name. | If none of the options specified, JUnit report is printed to stdout. +| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file name. | JUnit report is printed to stdout. | | `stripANSIControlSequences` | Wether to remove ANSI control sequences from the text before writing it in the report. | By default output text is added as is. | | `includeProjectInTestName` | Whether to include Playwright project name in every test case as a name prefix. | By default not included. | `PLAYWRIGHT_JUNIT_SUITE_ID` | | Value of the `id` attribute on the root `` report entry. | Empty string. From a98874c24c7a66d8d323248b9e5640d41cde1baa Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 29 Apr 2024 11:21:17 -0700 Subject: [PATCH 3/4] Added JSON description --- docs/src/test-reporters-js.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/src/test-reporters-js.md b/docs/src/test-reporters-js.md index 16d7839be08a5..7ec1e4a03acea 100644 --- a/docs/src/test-reporters-js.md +++ b/docs/src/test-reporters-js.md @@ -263,6 +263,12 @@ export default defineConfig({ }); ``` +JSON report supports following configuration options and environment variables: + +| Environment Variable Name | Reporter Config Option| Description | Default +|---|---|---|---| +| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file path. | JSON report is printed to stdout. + ### JUnit reporter JUnit reporter produces a JUnit-style xml report. @@ -297,7 +303,7 @@ JUnit report supports following configuration options and environment variables: | Environment Variable Name | Reporter Config Option| Description | Default |---|---|---|---| -| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file name. | JUnit report is printed to stdout. +| `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file path. | JUnit report is printed to stdout. | | `stripANSIControlSequences` | Wether to remove ANSI control sequences from the text before writing it in the report. | By default output text is added as is. | | `includeProjectInTestName` | Whether to include Playwright project name in every test case as a name prefix. | By default not included. | `PLAYWRIGHT_JUNIT_SUITE_ID` | | Value of the `id` attribute on the root `` report entry. | Empty string. From 6e7e3591437b2b8d997f63b0bb56fb980196c7e3 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 29 Apr 2024 11:22:58 -0700 Subject: [PATCH 4/4] Fix typo --- docs/src/test-reporters-js.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/test-reporters-js.md b/docs/src/test-reporters-js.md index 7ec1e4a03acea..6c85dba15d162 100644 --- a/docs/src/test-reporters-js.md +++ b/docs/src/test-reporters-js.md @@ -304,7 +304,7 @@ JUnit report supports following configuration options and environment variables: | Environment Variable Name | Reporter Config Option| Description | Default |---|---|---|---| | `PLAYWRIGHT_JUNIT_OUTPUT_NAME` | `outputFile` | Report file path. | JUnit report is printed to stdout. -| | `stripANSIControlSequences` | Wether to remove ANSI control sequences from the text before writing it in the report. | By default output text is added as is. +| | `stripANSIControlSequences` | Whether to remove ANSI control sequences from the text before writing it in the report. | By default output text is added as is. | | `includeProjectInTestName` | Whether to include Playwright project name in every test case as a name prefix. | By default not included. | `PLAYWRIGHT_JUNIT_SUITE_ID` | | Value of the `id` attribute on the root `` report entry. | Empty string. | `PLAYWRIGHT_JUNIT_SUITE_NAME` | | Value of the `name` attribute on the root `` report entry. | Empty string.