mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 10:15:12 +03:00
docs(test-runner): make reporter env snippets cross-os compatible (#7947)
This commit is contained in:
parent
deddf50c95
commit
5e0a60fca1
@ -236,7 +236,16 @@ JSON reporter produces an object with all information about the test run. It is
|
|||||||
|
|
||||||
Most likely you want to write the JSON to a file. When running with `--reporter=json`, use `PLAYWRIGHT_JSON_OUTPUT_NAME` environment variable:
|
Most likely you want to write the JSON to a file. When running with `--reporter=json`, use `PLAYWRIGHT_JSON_OUTPUT_NAME` environment variable:
|
||||||
```bash
|
```bash
|
||||||
|
# Linux/macOS
|
||||||
PLAYWRIGHT_JSON_OUTPUT_NAME=results.json npx playwright test --reporter=json,dot
|
PLAYWRIGHT_JSON_OUTPUT_NAME=results.json npx playwright test --reporter=json,dot
|
||||||
|
|
||||||
|
# Windows with cmd.exe
|
||||||
|
set PLAYWRIGHT_JSON_OUTPUT_NAME=results.json
|
||||||
|
npx playwright test --reporter=json,dot
|
||||||
|
|
||||||
|
# Windows with PowerShell
|
||||||
|
$env:PLAYWRIGHT_JSON_OUTPUT_NAME="results.json"
|
||||||
|
npx playwright test --reporter=json,dot
|
||||||
```
|
```
|
||||||
|
|
||||||
In configuration file, pass options directly:
|
In configuration file, pass options directly:
|
||||||
@ -268,7 +277,16 @@ JUnit reporter produces a JUnit-style xml report. It is usually used together wi
|
|||||||
|
|
||||||
Most likely you want to write the report to an xml file. When running with `--reporter=junit`, use `PLAYWRIGHT_JUNIT_OUTPUT_NAME` environment variable:
|
Most likely you want to write the report to an xml file. When running with `--reporter=junit`, use `PLAYWRIGHT_JUNIT_OUTPUT_NAME` environment variable:
|
||||||
```bash
|
```bash
|
||||||
|
# Linux/macOS
|
||||||
PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml npx playwright test --reporter=junit,line
|
PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml npx playwright test --reporter=junit,line
|
||||||
|
|
||||||
|
# Windows with cmd.exe
|
||||||
|
set PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml
|
||||||
|
npx playwright test --reporter=junit,line
|
||||||
|
|
||||||
|
# Windows with PowerShell
|
||||||
|
$env:PLAYWRIGHT_JUNIT_OUTPUT_NAME="results.xml"
|
||||||
|
npx playwright test --reporter=junit,line
|
||||||
```
|
```
|
||||||
|
|
||||||
In configuration file, pass options directly:
|
In configuration file, pass options directly:
|
||||||
|
Loading…
Reference in New Issue
Block a user