Anti-Patterns
When to Use
As a checklist before committing a Playwright config or sharing a report.
Wrong vs Right
- Wrong: opening
index.htmlviafile://→ Right:show-reportor any HTTP server - Wrong: committing
playwright-report/to git → Right:.gitignoreit - Wrong: assuming reports auto-archive across runs → Right: every run overwrites; copy/zip if you want archives
- Wrong:
trace: 'on'in CI → Right:'on-first-retry'keeps disk under control - Wrong: triage from terminal output → Right: open the report; the slider is the triage tool
- Wrong: bulk
--update-snapshotsafter seeing red → Right: scoped--update-snapshots --grep "<title>" - Wrong:
attachmentsBaseURL: 'https://cdn.example.com/runs/123'(no trailing slash) → Right: trailing slash always - Wrong: extracting
trace.zipbefore opening → Right: keep zip intact; viewer expects archive - Wrong:
host: 'localhost'inside DDEV → Right:0.0.0.0so the host can reach - Wrong: missing
if: always()on artifact upload → Right: always upload; failures are the runs you most need to triage - Wrong:
playwright-report/andtest-results/confusion → Right: report has the SPA + bundled attachments; test-results has raw per-test artifacts; report is what you ship - Wrong: using only
listreporter and skippinghtml→ Right: always includehtml; combine with others