Auto-wait, codegen, and trace viewer are the big three. But Playwright ships a lot more out of the box. In other tools, you need plugins or third-party libraries for these. In Playwright, they just work.
| Feature | What It Does | Why It Matters |
|---|---|---|
| Parallel Execution | Runs test files in parallel by default | A 20-minute suite drops to 5 minutes on 4 cores |
| Auto Retries | Retries failed tests N times (configurable) | Handles genuinely flaky infrastructure without manual re-runs |
| HTML Reporter | Generates a rich HTML report with filters | Share test results with managers who do not read terminal output |
| Screenshot on Failure | Captures a screenshot when a test fails | Instant visual context for every failure |
| Video Recording | Records video of the entire test run | Useful for demos and complex debugging |
| API Testing | Make HTTP requests with request fixture | Setup test data or verify backend state without a browser |
| Mobile Emulation | Emulate mobile devices with viewport and user agent | Test responsive layouts without real devices |
| Network Interception | Mock or block API responses | Test error states, empty states, and slow networks |
| Multiple Browsers | Run the same tests on Chromium, Firefox, WebKit | One command: npx playwright test --project=firefox |
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
// Run tests in parallel (default: number of CPU cores / 2)
workers: process.env.CI ? 1 : undefined,
// Retry failed tests
retries: process.env.CI ? 2 : 0,
// Reporter
reporter: 'html',
// Test against multiple browsers
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
{ name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
{ name: 'mobile-safari', use: { ...devices['iPhone 13'] } },
],
});Key Point: Parallel execution, retries, HTML reports, screenshots, video, API testing, mobile emulation, network mocking, multi-browser -- all built in. Zero plugins required.
Key Point: Playwright ships everything you need for professional test automation. No plugin hunting, no compatibility issues.