Skip to content

Report Generation

When to Use

Use this when controlling where reports land, how they relate to test runs, or managing sharded CI report merging.

Decision

Approach When
Default playwright-report/ Simple local development
Custom outputFolder Consistent path in CI pipelines
Copy/zip after each run Simple local archive of historical reports
blob reporter + merge Sharded CI runs across multiple machines

Pattern

Override location:

reporter: [['html', { outputFolder: 'reports/html' }]],

Blob reporter for sharded runs:

// On each shard
reporter: [['blob']]
# After all shards complete
npx playwright merge-reports --reporter=html ./all-blobs

Decision: playwright-report/ vs test-results/

Folder Contains
playwright-report/ The HTML SPA + bundled attachments — the triage UI
test-results/ Raw per-test attachments (failure screenshots, traces, videos) — referenced at generation; safe to delete after

Both are gitignored by convention. Only commit *-snapshots/ (the baselines next to test files).

Common Mistakes

  • Wrong: committing playwright-report/ to git → Right: gitignore it; it's regeneratable
  • Wrong: assuming reports accumulate across runs → Right: every run overwrites; copy/zip if you want archives
  • Wrong: confusing outputFolder (HTML report) with outputDir (test-results) → Right: different config keys, different folders

See Also