- Symptom
- test-results has no trace.zip for a local failureThe HTML report shows no Traces section for the failed test
- Cause
- The generated config uses trace: 'on-first-retry' together with retries: 0 outside CI. With no retry, nothing is recorded.
- Fix
- Use retain-on-failure, which records every test and keeps only the failing ones.
- Apply
// playwright.config.ts use: { trace: 'retain-on-failure' } # or one run: npx playwright test --trace on- Affected
- Playwright Test configs created by npm init playwright, all current versions
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders