Playwright vs Cypress vs Vitest (2026): How to Test a Web App
For JavaScript and TypeScript teams deciding how to test a web app, the answer is usually two tools, not one: Vitest or Jest for unit tests, and Playwright or Cypress for tests in a real browser. Checkly then runs the same Playwright scripts against production. All the test runners are free.
Key Takeaways
- These are layers, not rivals. Pick one unit runner and one browser runner, then decide whether you also want production checks.
- Vitest suits new, Vite-based and ESM projects; Jest still makes sense for large working suites and React Native.
- Playwright covers Chromium, Firefox and WebKit in four languages for free; Cypress offers an interactive runner and a paid dashboard.
- npm downloads for the week to November 12, 2026: Vitest 180.4M, @playwright/test 129.6M, Jest 59.5M, Cypress 7.1M.
- Vitest plus Playwright costs $0 beyond CI minutes. Cypress Cloud Team is $67 a month and Checkly Starter $24, both billed yearly.
At a Glance: Layer, Version and Price
| Tool | What it tests | Version, licence | What you pay | Watch for |
|---|---|---|---|---|
| Unit and component tests | 5.1, MIT | Free | Jest-only plugins and the React Native preset do not carry over | |
| Unit and snapshot tests | 30.5, MIT | Free | Native ESM still needs an experimental Node flag | |
| End-to-end browser tests | 1.65, Apache 2.0 | Free; you pay for your own CI | No hosted dashboard; mobile is emulated | |
| End-to-end and component tests | 16.3, MIT | Runner free; Cloud Team $67 / mo yearly | Cloud Free stops at 500 recorded results a month | |
| Playwright checks against production | CLI 10.1, Apache 2.0 | Hobby free; Starter $24 / mo yearly | Hobby is hard-capped at 1,000 browser runs a month |
Versions and licences from the npm registry on November 13, 2026. Prices from the Cypress and Checkly pricing pages, checked in November 2026.
Which testing layers does a web app need?
Comparing Vitest with Playwright is like comparing a spell checker with a proofreader. They catch different mistakes at different speeds, and most teams run both.
Unit and component
Functions, hooks and components, tested in Node or a light browser in milliseconds. Runs on every save. Vitest or Jest.
End-to-end
A real browser clicks through signup, checkout or onboarding. Slower and more fragile, so keep it to the flows that matter. Playwright or Cypress.
Production checks
The same browser scripts run on a schedule against the live site and alert when a flow breaks after release. Checkly.
How widely is each one used?
Weekly downloads from the npm registry for November 6 to November 12, 2026. Downloads count CI installs and transitive dependencies, so read them as momentum, not as a count of teams.
| Tool | npm package | Weekly downloads |
|---|---|---|
| vitest | 180.4M | |
| @playwright/test | 129.6M | |
| jest | 59.5M | |
| cypress | 7.1M |
Two shifts stand out. Vitest now has about three times Jest's weekly downloads, and the State of JS 2025 survey of 13,002 developers says Vitest is climbing fast enough to overtake Jest as the most-used tool. On the browser side, @playwright/test has about 18 times the weekly downloads of cypress. Neither number says Jest or Cypress is a bad choice for a team already using them.
Vitest or Jest: should you switch?
The case for Vitest is less setup. It reuses your Vite config, runs ESM and TypeScript without a transform, and reruns only the affected tests in watch mode. Its API mirrors Jest's, so a migration is mostly renaming imports and swapping jest.fn for vi.fn.
The case for staying on Jest is that it works. If your suite is large, on CommonJS, or part of a React Native app, a migration buys you speed and simpler config but costs review time and a few broken mocks. Jest 30.5 is actively maintained.
A practical test: move one package or folder, run both runners in CI for a week, and compare run time, flaky tests and the number of edits. That answers the question for your codebase better than any benchmark.
Playwright or Cypress: what actually differs?
Browsers
Playwright drives Chromium, Firefox and WebKit. Cypress supports Chrome-family browsers, Firefox and Electron; WebKit support is experimental.
Languages
Playwright has TypeScript, Python, .NET and Java bindings. Cypress tests are JavaScript or TypeScript.
Debugging
Cypress shows each command live in its runner with time-travel snapshots. Playwright records traces you open in the Trace Viewer after a run, locally or from CI.
Parallel runs
Playwright shards across CI machines with a flag. Cypress parallelisation is coordinated through Cypress Cloud, which is free up to 500 results a month.
If the choice is close, write the same three flows in both, say signup, login and one core action, and run them in your CI. Most teams know which one they prefer within a day.
What does testing cost a team of five?
Tool cost only, per month. CI minutes are extra on every setup and usually the larger line once end-to-end suites grow.
| Setup | Tool cost | What it covers |
|---|---|---|
| $0 | Traces and HTML reports are saved as CI artifacts | |
| $0 | Up to 500 recorded test results a month, 10 users | |
| $67 / mo yearly | 120,000 results a year, 50 users, 90-day retention | |
| +$24 / mo yearly | 3,000 browser runs a month: two checks every 30 minutes fits |
Cypress Cloud counts each recorded test result. A 100-test suite recorded 20 times a month is 2,000 results, which is past the free tier. Checkly's 3,000 browser runs fit two checks every 30 minutes (2,880 a month).
Feature Comparison
From each project's documentation and pricing page. Unit runners and browser runners do different jobs, so a cross in one column is often expected, not a weakness.
Scope
Setup
Running and cost
Vitest: unit tests that share your Vite config
Vitest reads the same config and plugins as your Vite build, so path aliases, JSX and environment variables work in tests without a second setup. ESM, TypeScript and JSX run out of the box, and watch mode reruns only the tests touched by a change. The expect, mock and snapshot APIs follow Jest, which is why most Jest suites move over with find-and-replace edits rather than rewrites.
Vitest 4, released in October 2025, made Browser Mode stable and added visual regression testing with toMatchScreenshot. The current release is 5.1, MIT licensed and maintained by VoidZero. It also tests backend code that has nothing to do with Vite. In the week to November 12, 2026, the vitest package had about 180 million npm downloads, the most of any tool here.
Best for: New JavaScript and TypeScript projects, Vite-based apps and ESM-first codebases. Skip if: you ship React Native or rely on Jest-only plugins, where Jest is still the default.
Jest: the established default with the most answers online
Jest runs with no config on most JavaScript projects and ships snapshots, mock functions and coverage in the box. It runs test files in parallel in isolated processes and runs previously failed tests first. After a decade as the default, almost every library documents a Jest setup, and almost every error has an answer somewhere.
The current release is 30.5, MIT licensed and stewarded by the OpenJS Foundation. Its weak spot in 2026 is native ESM, which still needs Node’s --experimental-vm-modules flag, and TypeScript, which needs ts-jest or Babel. The State of JS 2025 survey still lists Jest as the most-used testing tool, while noting its satisfaction is trending down and Vitest may overtake it.
Best for: Teams with a large working suite, React Native apps and CommonJS codebases. Skip if: you are starting fresh on Vite or native ESM, where Vitest needs less setup.
Playwright: free cross-browser tests in four languages
Playwright, maintained by Microsoft under Apache 2.0, drives Chromium, Firefox and WebKit from one API, headless or headed, on Linux, macOS and Windows. WebKit is the engine behind Safari, so Playwright is the usual way to catch Safari bugs without a Mac in CI. Tests can be written in TypeScript, Python, .NET or Java.
Auto-waiting, parallel workers, sharding across CI machines, codegen and the Trace Viewer are all free. There is no hosted dashboard: you keep HTML reports and traces as CI artifacts. The Playwright MCP server and CLI let AI coding agents drive a browser, and the VS Code extension runs, debugs and records tests from the editor. The current release is 1.65.
Best for: Teams that need Safari-engine coverage, several languages or free parallel runs. Skip if: you need real phones rather than emulation; a device cloud such as BrowserStack covers that.
Cypress: an interactive runner and a hosted dashboard
Cypress runs inside the browser and shows every command in a live log as the test runs, with time-travel snapshots you can click through. Many front-end developers find that easier when they write and debug tests. It covers end-to-end and component tests, in JavaScript or TypeScript only. The runner is MIT licensed; the current release is 16.3.
Cypress Cloud is the paid layer: Test Replay, flake detection, parallelisation and Cloud MCP. The free Starter tier includes 10 users, 500 test results a month and 30-day retention. Team is $67 a month billed yearly ($799 a year) for 120,000 results a year, and Business is $267 a month billed yearly. UI Coverage and Accessibility are paid add-ons. cy.prompt writes Cypress commands from plain-English steps.
Best for: Front-end teams that like an interactive runner and want recordings without building a dashboard. Skip if: you need WebKit coverage or tests in Python, Java or C#, where Playwright fits.
Checkly: your Playwright tests as production monitors
Checkly runs Playwright browser checks, API checks and uptime monitors on a schedule from its own global locations, and alerts by Slack, email or webhook when one fails. Checks are defined in code with the Checkly CLI and kept in Git next to the app, so the scripts you already wrote for CI can watch production too.
The Hobby plan is free with 10,000 API and 1,000 browser check runs a month, hard-capped, plus 10 uptime monitors and one user. Starter is $24 a month billed yearly for 25,000 API and 3,000 browser runs and 3 users; Team is $64 a month billed yearly for 100,000 API and 12,000 browser runs. Paid plans bill overage per run.
Best for: Teams whose revenue depends on a handful of flows such as signup, login and checkout. Skip if: you only need to know the site is up, where a basic uptime monitor is cheaper.
How do AI coding agents change testing?
Coding agents now write a large share of tests, and they need a way to check their own UI changes. Playwright's MCP server and CLI give an agent a real browser it can read through accessibility snapshots, which is why Playwright shows up in so many agent setups. Cypress answers with cy.prompt, which turns plain-English steps into Cypress commands and shows the generated code so it can be reviewed and committed.
The output is still ordinary test files. Review agent-written tests the way you review agent-written code: check that each assertion tests behaviour a user would notice, and delete tests that only restate the implementation. A fast unit runner matters more when an agent reruns the suite after every edit.
Which setup fits your team?
Four common starting points, routed by what you already have.
New Vite, Next.js or SvelteKit app
Vitest for unit and component tests and Playwright for a short list of end-to-end flows. Both are free, both run in GitHub Actions without a service account.
Existing Jest suite or React Native
Keep Jest. Add Playwright or Cypress for the web flows, and revisit Vitest when ESM or TypeScript transforms start costing you time.
Front-end team that wants a dashboard
Cypress with Cypress Cloud for recordings, Test Replay and flake reports, plus Vitest for unit tests. Budget $67 a month on yearly billing once you pass 500 results a month.
Revenue depends on a few flows
Reuse your Playwright scripts as monitors in Checkly so a broken signup or checkout pages someone within minutes, not when a customer emails.
Need real iPhones and Android devices? That is a separate purchase. Our testing category covers BrowserStack, TestMu AI and Sauce Labs, which run your Playwright or Selenium suite on rented hardware.
How We Compared These Tools
Versions, licences and weekly downloads come from the npm registry on November 13, 2026. Prices come from the Cypress and Checkly pricing pages, read in November 2026; Cypress does not show monthly-billing prices. Feature claims come from each project's own documentation and release notes, and survey findings from the State of JS 2025 results page.
We did not run our own benchmark, because test speed depends heavily on the suite, the machine and the CI setup. We do not give these tools a score out of 10. Each one gets a "best for" and a "skip if" instead. We have no affiliate relationship with any of them.
Frequently Asked Questions
Is Playwright better than Cypress in 2026?
Neither is better for every team. Playwright drives Chromium, Firefox and WebKit, supports TypeScript, Python, .NET and Java, and shards across CI machines for free. Cypress shows each command live in an interactive browser runner and sells a hosted dashboard, Cypress Cloud, with recordings and flake reports. Playwright has grown much faster: in the week to November 12, 2026, @playwright/test had about 129.6 million npm downloads against about 7.1 million for cypress. Pick Playwright if you need Safari-engine coverage or several languages; pick Cypress if your front-end team prefers its runner and wants a paid dashboard.
Should I switch from Jest to Vitest?
Switch if your app builds with Vite, your code is native ESM, or you maintain a TypeScript transform just for Jest. Vitest keeps a Jest-compatible API for expect, mocks and snapshots, so most suites move with small edits. Stay on Jest if you build with React Native, depend on Jest-only plugins, or have a large CommonJS suite that works. Convert one package first and compare the edits and run time before converting a monorepo.
Do I need both Vitest and Playwright?
Most web apps benefit from both, because they test different things. Vitest checks functions and components in milliseconds and runs on every save. Playwright opens a real browser and walks through flows such as signup and checkout. A common split is hundreds of unit tests and a few dozen end-to-end tests for the paths that make money.
Is Cypress free?
The Cypress test runner is free and open source under MIT. Cypress Cloud, the hosted dashboard for recordings, Test Replay and flake reports, has a free Starter tier with 10 users, 500 test results a month and 30-day retention. Team is $67 a month billed yearly ($799 a year) for 120,000 results a year and 50 users. Business is $267 a month billed yearly.
Can Vitest replace Playwright for browser tests?
For component tests, often yes. Vitest 4 made Browser Mode stable in October 2025, so components render in a real browser, and it added screenshot comparisons. Vitest is still not built for multi-page user flows across browsers, logins and redirects; Playwright or Cypress handle those.
How do AI coding agents use Playwright or Cypress?
Playwright ships an MCP server and a CLI that let coding agents such as Claude Code or Cursor drive a real browser through accessibility snapshots, which is how many agents check their own UI changes. Cypress has cy.prompt, which turns plain-English steps into Cypress commands and shows the generated code so you can commit it. Both still produce ordinary test files that run in CI.
What is the difference between Playwright and Checkly?
Playwright runs tests in your CI before a release. Checkly runs Playwright scripts on a schedule from its own cloud locations against your live site and alerts when they fail. The free Hobby plan includes 1,000 browser and 10,000 API check runs a month; Starter is $24 a month billed yearly for 3,000 browser runs.
Which testing tools should a startup use?
For a JavaScript or TypeScript web app, Vitest plus Playwright costs nothing beyond CI minutes and covers unit and browser tests. Swap Playwright for Cypress if your team prefers its runner, and keep Jest if you already have a working suite or ship React Native. Add Checkly once an outage in signup or checkout would cost you real money.
Keep Comparing
The two browser runners side by side
Jest vs VitestUnit runners, migration and ESM
BrowserStack vs ChecklyDevice cloud vs production checks
Testing ToolsEvery tool in the category, device clouds included
Best AI Code Review Tools 2026The other half of shipping safely
Sentry vs Datadog vs New RelicWhat catches the bugs tests miss