In the Playwright vs Cypress decision for December 2026, Playwright is the safer default for most teams. It runs tests out of process, covers Chromium, Firefox and WebKit, handles multiple tabs, origins and users natively, and shards across CI machines for free. Cypress still offers the best interactive debugging experience for single-origin web apps, but cross-machine parallelization requires recording to Cypress Cloud, which has a free tier with low limits. Below I compare both on architecture, browsers, parallelism, network mocking, component testing, debugging and CI. The same test is written in both, and I ran both locally on Playwright 1.65.2 and Cypress 16.5.0.
Playwright vs Cypress: Quick Comparison
| Playwright 1.65 | Cypress 16.5 | |
|---|---|---|
| Released | 1.65.2 on 1 Dec 2026 (npm) | 16.5.0 on 1 Dec 2026 (npm) |
| Architecture | Test runs in Node, drives the browser over a protocol | Test runs inside the browser, next to your app |
| Languages | TypeScript/JavaScript, Python, Java, .NET | JavaScript/TypeScript only |
| Browsers | Chromium, Firefox, WebKit (plus Chrome and Edge channels) | Chrome family, Edge, Firefox 140+, WebKit (experimental); Electron deprecated |
| Multiple tabs / users | Native (BrowserContext, multiple pages) |
Not supported; one tab, one browser |
| Cross-origin | Native | cy.origin() blocks |
| Parallel across machines | Built-in --shard, free |
--record --parallel through Cypress Cloud |
| Debugging | Trace Viewer, UI mode, HTML report | Time-travel command log in the runner, Test Replay in Cloud |
| Component testing | mount fixture with stories and a gallery page |
Mature mount adapters for React, Vue, Angular, Svelte (alpha) |
| Node.js | 1.65 dropped Node 20 | 16.0 requires Node 22, 24, or 26+ |
The browser builds come from the Playwright release notes: Chromium 158, Firefox 159 and WebKit 27.2 for 1.65, also tested against Chrome 157 and Edge 156 stable. Cypress's support matrix is on its launching browsers page.
Architecture: Out-of-Process vs In-Browser
This difference explains almost everything else in the comparison.
Cypress runs your test code inside the browser. The spec is bundled and loaded into an iframe next to your application, so cy.get() works on the real DOM directly and the runner can snapshot every command. The Cypress trade-offs page is direct about the costs. "You cannot use Cypress to drive two browsers at the same time." Each test is bound to a single superdomain. Most actions "simulate events in JavaScript instead of firing native browser events". There is still no cy.hover(). Node-side work such as seeding a database goes through cy.task(). Cypress 16 removed cy.exec(), so cy.task() is now the only way.
Playwright runs your test in Node and controls the browser from outside: over the DevTools protocol for Chromium, and through patched builds of Firefox and WebKit. Your test is ordinary async code. A BrowserContext is a cheap, isolated, incognito-like profile, and you can open as many contexts and pages as you want. Input goes through the browser's own input pipeline, so hover, drag and keyboard shortcuts behave like a user's.
What this means in practice:
- With Cypress, the commands look synchronous but are queued, so you can't
awaitthem or store their results in variables. With Playwright youawaiteverything, and a forgottenawaitis the most common bug. Turn on the@typescript-eslint/no-floating-promiseslint rule. - Playwright handles a test that opens a popup, switches to a second user, or follows an OAuth redirect to another domain without extra setup. With Cypress, each of these needs a workaround (
cy.origin,@cypress/puppeteer, or splitting into separate tests). - Because Cypress sits inside the page, it can stub
windowfunctions, the clock and app objects directly. Playwright can do the same withpage.addInitScriptandpage.clock, but you have to set it up first.
One Test, Written in Both
I built a tiny cart page that calls /api/cart and renders the items. I wrote the same two tests in both tools: one stubs a successful response, the other stubs a 500 error. Both suites ran against the same local Node server, in installed Google Chrome.
Playwright
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? 'blob' : 'list',
use: { baseURL: 'http://localhost:4173', trace: 'on-first-retry' },
webServer: {
command: 'node server.js',
url: 'http://localhost:4173',
reuseExistingServer: !process.env.CI,
},
projects: [
{ name: 'chrome', use: { ...devices['Desktop Chrome'], channel: 'chrome' } },
],
});
// tests/cart.spec.ts
import { test, expect } from '@playwright/test';
test('renders items from the cart API', async ({ page }) => {
await page.route('**/api/cart', (route) =>
route.fulfill({ json: { items: [{ sku: 'B2', name: 'Stubbed mug', qty: 2 }] } }),
);
await page.goto('/');
await page.getByRole('button', { name: 'Load cart' }).click();
await expect(page.getByRole('list', { name: 'cart items' })).toContainText('Stubbed mug × 2');
await expect(page.getByRole('status')).toHaveText('1 item(s)');
});
test('shows an error when the cart API fails', async ({ page }) => {
await page.route('**/api/cart', (route) => route.fulfill({ status: 500 }));
await page.goto('/');
await page.getByRole('button', { name: 'Load cart' }).click();
await expect(page.getByRole('status')).toHaveText('Could not load cart');
});
test('two users in isolated contexts', async ({ browser }) => {
const alice = await browser.newContext();
const bob = await browser.newContext();
const [a, b] = [await alice.newPage(), await bob.newPage()];
await Promise.all([a.goto('/'), b.goto('/')]);
await a.getByRole('button', { name: 'Load cart' }).click();
await expect(a.getByRole('status')).toHaveText('1 item(s)');
await expect(b.getByRole('status')).toHaveText('');
await alice.close(); await bob.close();
});
The first run failed, and the failure showed what Playwright's reporting does well:
Error: expect(locator).toContainText(expected) failed
Locator: getByRole('list', { name: 'cart items' })
Expected substring: "Stubbed mug × 2"
Received string: "Stubbed mug × 2"
Timeout: 5000ms
That is classic mojibake. My test server sent text/html with no charset, so Chrome decoded the UTF-8 × as Latin-1. The bug was in the app, not the test. The error also wrote an error-context.md file with the page's accessibility snapshot. Adding charset=utf-8 to the header fixed it:
Running 3 tests using 3 workers
✓ 1 [chrome] › tests/cart.spec.ts:13:1 › shows an error when the cart API fails (419ms)
✓ 3 [chrome] › tests/cart.spec.ts:3:1 › renders items from the cart API (432ms)
✓ 2 [chrome] › tests/cart.spec.ts:20:1 › two users in isolated contexts (606ms)
3 passed (1.6s)
The third test has no Cypress equivalent. Two isolated sessions running side by side in one test is how you test chat, collaborative editing, or an admin approving a user's request.
Cypress
// cypress.config.ts
import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:4173',
supportFile: false,
specPattern: 'cypress/e2e/**/*.cy.ts',
},
video: false,
});
// cypress/e2e/cart.cy.ts
describe('cart', () => {
it('renders items from the cart API', () => {
cy.intercept('GET', '/api/cart', {
body: { items: [{ sku: 'B2', name: 'Stubbed mug', qty: 2 }] },
}).as('cart');
cy.visit('/');
cy.contains('button', 'Load cart').click();
cy.wait('@cart');
cy.get('ul[aria-label="cart items"]').should('contain.text', 'Stubbed mug × 2');
cy.get('[role=status]').should('have.text', '1 item(s)');
});
it('shows an error when the cart API fails', () => {
cy.intercept('GET', '/api/cart', { statusCode: 500 });
cy.visit('/');
cy.contains('button', 'Load cart').click();
cy.get('[role=status]').should('have.text', 'Could not load cart');
});
});
The Cypress setup failed twice before any test ran. First: You are attempting to run a TypeScript file, but do not have TypeScript installed. Playwright strips types itself, but Cypress needs typescript in your project. Second: TsConfigNotFoundError: No tsconfig.json found. ts-loader needs a tsconfig.json file. A minimal cypress/tsconfig.json fixed it:
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022", "DOM"],
"types": ["cypress", "node"],
"skipLibCheck": true
},
"include": ["**/*.ts"]
}
│ Cypress: 16.5.0 │
│ Browser: Chrome 158 (headless) │
│ Node Version: v24.15.0 (/usr/local/bin/node) │
cart
✓ renders items from the cart API (133ms)
✓ shows an error when the cart API fails (86ms)
2 passing (228ms)
Also plan for install size. The Cypress 16.5.0 binary cache came to 524 MB on my machine. Cache ~/.cache/Cypress in CI, or set CYPRESS_CACHE_FOLDER and cache that path.
Network Mocking
Both tools mock network calls well, with different styles.
| Task | Playwright | Cypress |
|---|---|---|
| Stub a response | page.route(url, r => r.fulfill({ json })) |
cy.intercept(method, url, { body }) |
| Modify a real response | const res = await route.fetch(); route.fulfill({ response: res, json: patched }) |
cy.intercept(url, req => req.continue(res => { res.body = … })) |
| Wait for a call | await page.waitForResponse(url) |
cy.wait('@alias') |
| Abort / simulate offline | route.abort(), context.setOffline(true) |
{ forceNetworkError: true } |
| Replay recorded traffic | page.routeFromHAR('file.har') |
No built-in HAR replay |
| Scope | Per page or per context (covers service workers and popups) | Per test, in the single tab |
cy.wait('@cart') is one of the cleanest synchronization primitives in any test tool, and Playwright users often reimplement it badly. Playwright's HAR replay and context-wide routing work better for larger fixtures and multi-page flows. If you stub OAuth or WebAuthn flows, Playwright 1.61 added a virtual WebAuthn credentials API that can complete passkey ceremonies. It pairs well with our passkeys implementation guide.
Parallelism and Sharding: Free vs Paid
This is where the cost difference shows up.
Playwright runs test files in parallel worker processes on each machine by default. fullyParallel: true also splits tests within a file. Across machines you use the built-in --shard flag, and the blob reporter plus npx playwright merge-reports combines the per-shard results into one HTML report. None of this needs a paid service. Recent releases added test locks (1.63) and the -exclusive- lock (1.65) for tests that must not run alongside others.
Cypress runs specs one at a time on a single machine. To spread specs across CI machines, the parallelization docs say: "Running tests in parallel requires you to pass the --record flag." In other words, Cypress Cloud coordinates the load balancing. The Cypress pricing page (checked 2 December 2026) lists:
| Cypress Cloud plan | Price | Test results | Notable features |
|---|---|---|---|
| Starter | Free | 500 per month, 10 users | Parallelization, load balancing, Test Replay |
| Team | $67/month, billed annually at $799 | 120k per year, 50 users | + Flake detection |
| Business | $267/month, billed annually at $3,199 | 120k per year, 50 users | + Spec Prioritization, Auto Cancellation, re-run optimization |
| Enterprise | Custom | 1.8M per year | + Premium support, 180-day retention |
UI Coverage and Cypress Accessibility are paid add-ons on the paid tiers. 500 results a month is about one run per working day of a 25-test suite. Above that, you either pay or split specs yourself with community plugins, with no central load balancing. Eligible open-source projects can get an OSS plan.
Multi-Tab, Multi-Origin and iframes
- Multiple tabs. Playwright:
context.waitForEvent('page')catches atarget=_blanklink, and you work with both pages. Cypress closes extra tabs between tests. Its recommended path for popups is the@cypress/puppeteerplugin, or removing thetargetattribute and staying in one tab. - Cross-origin. Playwright doesn't care about origins. In Cypress, commands against another origin must be wrapped in
cy.origin('https://idp.example.com', () => { … }). The 16.1.1 notes clarify that withinjectDocumentDomainoff (the default), a subdomain counts as a different origin too. - iframes. Playwright's
frameLocator()handles any frame, and since 1.63 it can search every frame in the subtree without a selector. Cypress can query same-origin iframes, but a "switch into iframe" command is still only a proposal.
Component Testing
Cypress component testing is the more established option. Its framework matrix covers React 18+ and Vue 3 with Vite 8 or webpack 5, Angular 21+, Next.js 15 to 16, and Svelte 5 (alpha). Note the Cypress 16 cutoffs: Vite 5 to 7 and Angular 18 to 20 were dropped, so a project still on Vite 7 must upgrade first. Our Vite 8 migration guide covers that upgrade.
Playwright rebuilt component testing in 1.62. The @playwright/experimental-ct-* packages are gone. You now write stories (small wrapper components) and a gallery page served by your own dev server, and the built-in mount fixture loads a story by ID. It works with any framework your dev server can render. However, it is newer, and teams on the old packages should stay on 1.62 until they migrate. If you are already on Vite, Vitest's Browser Mode (stable since Vitest 4) is also worth comparing for component-level tests.
Debugging: Trace Viewer vs Time Travel
Cypress's interactive runner is still its best feature. Every command appears in a log, and hovering over one shows the DOM snapshot at that moment, the "time travel" view. Because the test runs in the page, you can open DevTools and inspect your app's objects in the same session. In CI, Cypress Cloud's Test Replay (included on the free Starter plan) records the DOM, network and console so you can step through a failed run in the browser.
Playwright's Trace Viewer gives you the same capability without a hosted service. With trace: 'on-first-retry', a failing CI run produces a trace.zip containing DOM snapshots before and after each action, network calls, console output and the source line. Open it with npx playwright show-trace or the HTML report. UI mode (npx playwright test --ui) adds watch-mode and time-travel debugging locally. Recent releases show steps with parameters (1.63) and aria snapshots in traces, and the bundled Playwright MCP server (1.62) lets coding agents drive the browser.
For a developer clicking through a local failure, Cypress's runner is a little better. For diagnosing a failure that only happens in CI, a self-contained trace file is easier to work with than a hosted replay, and it costs nothing.
CI Setup
Playwright on GitHub Actions with four shards and a merged report, adapted from the official example:
name: e2e
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with: { node-version: 24 }
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
- uses: actions/upload-artifact@v5
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.shardIndex }}
path: blob-report
retention-days: 1
merge:
if: ${{ !cancelled() }}
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with: { node-version: 24 }
- run: npm ci
- uses: actions/download-artifact@v5
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- run: npx playwright merge-reports --reporter html ./all-blob-reports
- uses: actions/upload-artifact@v5
with:
name: playwright-report
path: playwright-report
retention-days: 14
The local config earlier pins channel: 'chrome'. On CI, either switch that project to the bundled Chromium (as the install step above assumes) or install branded Chrome with npx playwright install --with-deps chrome.
Cypress with Cloud-coordinated parallelism, using the official action (v7.4.10 is the latest release):
name: e2e
on: [push]
jobs:
cypress:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v6
- uses: cypress-io/github-action@v7
with:
start: node server.js
wait-on: 'http://localhost:4173'
browser: chrome
record: true
parallel: true
group: e2e-chrome
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Both jobs bill for four runners. The Cypress job also counts against your Cloud test-result quota. Our GitHub Actions pricing breakdown shows how runner minutes add up for matrix jobs like these.
Which Should You Choose?
Choose Playwright if any of these apply: you need Safari/WebKit coverage that runs on Linux CI, multi-user or multi-tab flows, OAuth or payment redirects across domains, non-JavaScript test authors (Python, Java, .NET), or free horizontal scaling.
Choose Cypress if your app is a single-origin SPA, your team values the interactive runner above everything else, you already use Cypress component testing across Angular or Vue, or you want Cloud's flake analytics and Test Replay and will pay for them.
Migrating an existing Cypress suite rarely pays off by itself. Migrate when you hit a trade-off you can't work around, usually multi-tab, cross-origin, or the cost of parallel runs.
Frequently Asked Questions
Is Playwright faster than Cypress?
Per test, it depends on the app. In my tiny suite Cypress reported 228 ms for its two tests, and Playwright took 1.6 seconds wall clock for three tests including worker startup. At suite level, Playwright usually finishes sooner in practice because it parallelizes within one machine and shards across machines for free. Cypress runs specs one at a time per machine unless you record to Cypress Cloud.
Can Cypress test Safari?
Only approximately. Cypress has experimental WebKit support. Its docs say "you may encounter issues." Playwright's WebKit build is a supported first-class target on macOS, Linux and Windows. Neither tool drives the real Safari app. For real Safari, use a device cloud.
Is Cypress Cloud required to run Cypress in parallel?
To have Cypress split specs across multiple CI machines with load balancing, yes. --parallel requires --record to Cypress Cloud. The free Starter plan includes parallelization but caps you at 500 test results per month. Without Cloud, you have to split specs across jobs yourself.
Can Playwright and Cypress run in the same repo?
Yes, and teams often do this while migrating. Keep separate config files and directories (tests/ vs cypress/), and make sure both don't try to start the dev server on the same port in CI. Port tests feature by feature and delete the Cypress spec once the Playwright version is green.
Which is better for component testing?
Cypress is more established, with official mount adapters for React, Vue, Angular and Svelte (alpha). Playwright's 1.62 stories and gallery model is framework-agnostic and runs in real browsers, but it is newer. If you already use Vite, Vitest Browser Mode is a strong third option.
Bottom Line
The Playwright vs Cypress choice now comes down to architecture and cost more than features. Playwright's out-of-process design handles multiple tabs, origins and browsers natively, and its sharding and Trace Viewer are free. Cypress's in-browser design gives the best interactive debugging, but it caps you at one tab and one superdomain, and cross-machine parallelism goes through Cypress Cloud. Start new projects on Playwright. Keep a working Cypress suite unless one of its trade-offs is blocking you.