How to get the JSON report
Playwright's JSON reporter prints to standard output unless you name a file:
npx playwright test --reporter=json > results.json
PLAYWRIGHT_JSON_OUTPUT_NAME=results.json npx playwright test --reporter=jsonOr set it in playwright.config.ts, next to the HTML reporter if you use one:
reporter: [['json', { outputFile: 'results.json' }]],The JSON file is the one to keep when a script or a dashboard needs the results. The HTML report is for people, and the blob report exists to merge the reports of sharded runs with npx playwright merge-reports.
What the viewer reads
The JSON nests suites (files, then describe blocks) down to specs, and each spec holds one test per project. The viewer flattens that:
Finding flaky tests across runs
A test that is flaky within one run shows up here as flaky. A test that passes in one CI run and fails in the next, with no retry in between, only shows when you compare runs: drop the JSON from several runs into the flaky test finder.
To split a slow suite, Playwright's --shard=1/4 splits by test file, or by individual test when fullyParallel is on. The test shard balancer reads this JSON and shows how evenly your files can be divided.
Sources
Testland for teams
In developmentAutomated test reports, manual test runs and regression tracking in one workspace. A separate product, built on the same skills.
One email when it opens, nothing else. Privacy policy