All modes compared
Same settings, every Playwright trace mode side by side. Your current pick is highlighted.
| Mode | Traces kept | Total size |
|---|---|---|
| off | 0 | 0 KB |
| retain-on-failure | 10 | 5.1 MB |
| retain-on-first-failure | 10 | 5.1 MB |
| on-first-retry | 10 | 5.1 MB |
| retain-on-failure-and-retries | 30 | 15 MB |
| on-all-retries | 20 | 10 MB |
| on | 200 | 102 MB |
Your config, ready to paste
Playwright 1.59, retain-on-failure mode. Paste into your playwright.config.ts.
import { defineConfig } from "@playwright/test";
// Generated by TestDino Playwright Trace Configurator
// https://testdino.com/tools/playwright-trace-configurator
export default defineConfig({
use: {
trace: {
mode: "retain-on-failure",
screenshots: true,
snapshots: true,
sources: true,
attachments: false,
},
},
});Every toggle maps to a real Playwright trace option. Full list in the official Playwright docs.
How this works?
How we estimate Playwright trace size and build your config.
Pick your trace mode
Choose when Playwright records a trace: every test, only failures, on the first retry, or never. Each mode changes how many trace files your CI keeps.
Set your test parameters
Tell the tool how many tests you run, how complex the pages are, how many actions each test takes, and what failure rate you expect. These drive the per-trace size estimate.
See the size estimate
The tool calculates how many trace files your mode keeps and multiplies by the per-trace size from screenshots, DOM snapshots, sources, and attachments.
Copy your config
Once the numbers look right, copy the generated playwright.config.ts snippet. It reflects exactly the mode and sub-options you chose.
More free tools for Playwright teams
FAQs
Within roughly 30% of a real run. Screenshot size depends on your actual UI; snapshot size depends on DOM depth. The estimate is built from median values across real Playwright traces, not worst-case peaks. Run the tool against your actual failure rate and complexity and compare to a real CI artifact.
