playwright HTML report not generated on CI: how to fix
Fixes missing Playwright HTML reports on CI by checking the reporter configuration and adding an artifact upload step for the report folder. Use it when a CI run finishes but no report is available to download. Not for report content customization, or for viewing reports locally.
TL;DR
Make sure the HTML reporter is actually enabled in the CI invocation and that the report folder is uploaded as a build artifact; most "missing report" cases are a reporter override or a missing upload step, not a generation failure. Set open: 'never' so the reporter never tries to launch a browser on a headless runner.
Problem
The run finishes on CI but there is no HTML report to download or view.
Steps
- Confirm the reporter config includes HTML:
reporter: [['html', { open: 'never' }]], and that the CI command does not override it with--reporter=line. Expected: the config and the command agree on the reporter. - Re-run and check the log for the HTML report line plus the
playwright-reportfolder in the working directory. Expected: the folder exists withindex.htmlinside. - Add an artifact upload step for the
playwright-reportfolder in your CI yaml. Expected: the report appears in the run's artifacts tab. - Optional: also upload
test-resultsfor traces and attachments. Expected: failed-test traces are downloadable alongside the report.
When to use
- CI finishes green or red but no HTML report artifact exists.
- You recently changed the reporter flags in the CI command.
- The report works locally but never shows up in CI.
When not to use
- Customizing what the HTML report contains (reporter options, not generation).
- Opening a report on your own machine (
npx playwright show-reportcovers that). - A different reporter (JUnit, JSON) is missing (same idea, different folder).
Tool compatibility
- Playwright 1.40 through 1.5x HTML reporter.
- Any CI with artifact uploads: GitHub Actions, GitLab CI, Jenkins, CircleCI.
Variant phrasings
playwright report folder empty after CI run
Usually the reporter was overridden on the command line, or the run was killed before the reporter flushed.
no html report artifact in github actions playwright
Add the upload-artifact step pointing at the playwright-report folder.
Why it happens
CI templates often set --reporter=line for readable logs, which replaces the HTML reporter entirely. And even when the report is generated, the folder vanishes with the runner unless it is uploaded as an artifact.
Edge cases
- Report downloads but will not open from the artifacts UI: download it and serve locally with
npx playwright show-report; artifact browsers are not web servers. - Report generation is slow on huge suites: trim retained attachments or split the run.
- The job is canceled mid-run: reporters flush at the end, so a killed job can leave a partial folder.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_S1pE8KvMJDHa4ZxlIMJmmg
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.