Skip to main content

Playwright Config Generator

Build a playwright.config.ts file visually. Choose browsers, set timeouts and retries, pick reporters, and configure screenshot/video/trace collection. Copy the ready-to-use output directly into your project.

✓ Chromium, Firefox, WebKit ✓ TypeScript & JavaScript ✓ Screenshots, Video, Traces ✓ Copy-ready output

Frequently Asked Questions

What is playwright.config.ts used for?▼

playwright.config.ts (or .js) is the central configuration file for Playwright Test. It defines which browsers to test, timeouts, retry counts, reporters, artifact collection (screenshots, video, traces), and test file patterns. Every setting has a sensible default, so you only need to configure what differs from the defaults.

How many browsers should I test?▼

For most web apps, starting with Chromium alone covers ~65% of users and is fastest. Add Firefox for cross-browser compatibility. Add WebKit (Safari) if you have macOS/iOS users. Testing all three gives the best coverage but roughly triples test time. Use the --project flag to run a single browser in CI for speed: `npx playwright test --project=chromium`.

What are retries and when should I use them?▼

Retries re-run a failed test up to N times before marking it as failed. Use 0 in local development (fail fast, debug immediately). Use 1-2 in CI to handle flaky tests caused by network timing or race conditions. Never use retries to mask genuinely broken tests — fix the root cause instead.

What is the difference between trace, video, and screenshot?▼

Screenshots capture the page state at the moment of failure. Videos record the full test run as an mp4. Traces (Playwright Trace Viewer) capture network requests, console logs, DOM snapshots, and an action timeline — the most powerful debugging artifact. `retain-on-failure` and `on-first-retry` are good balanced defaults that only collect artifacts when tests fail, saving disk space.

What does fullyParallel mean?▼

When fullyParallel is true, each individual test runs in parallel across workers. When false, each test file runs in one worker but files run in parallel. fullyParallel: true is faster for suites with many small tests. Set workers to '50%' or '100%' to use multiple CPU cores. In CI, typically use workers: 1 for serial execution to avoid resource contention.

How does the webServer option work?▼

The webServer config tells Playwright to auto-start your dev server (e.g., `npm run dev`) before running tests and wait for it to be ready. Set reuseExistingServer: !process.env.CI so it reuses an already-running server locally but always starts fresh in CI. This avoids port conflicts and ensures tests always run against the correct version.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →