QA Interview Hub · Knowledge base · Quizzes · Українська

Cypress › Cypress vs Playwright

When would you choose Cypress over Playwright?

A tool is chosen by constraints, not by fashion: the scenarios, the team, the existing suite and the browsers needed. Cypress fits a single-page app on one domain when frontend developers write the tests and like the Test Runner with time-travel. A large stable Cypress suite is not rewritten without a concrete pain. Several tabs or users at once, a non-JavaScript test language or a need for WebKit are arguments for Playwright.

Cypress · Comparison

You are asked which tool you would take, and the right answer is not "the trendier one". How do you justify it?

The question "When would you choose Cypress?" checks whether you can choose a tool for constraints rather than by sympathy. A weak answer is a slogan. A good one names criteria and what changes them.

How it works and why. The choice consists of four questions: what the app and the scenarios are (several tabs, several users, several domains), who writes the tests (frontend developers or a separate QA team, JS or another language), what already exists (a test suite, infrastructure, a trained team) and which browsers are needed. Cypress answers the first group well when the app is a single-page app on one domain, and the second when tests are written together with developers who find the interactive Test Runner with time-travel convenient. Playwright wins when scenarios go beyond one tab or JS.

When each fits

Cypress

When it fits

A single-page app on one domain, tests written by a frontend team that likes time-travel and the component tests built into Cypress.

Playwright

When it fits

Several tabs or users, WebKit, a non-JS team, a need for sharding and parallelism with no extra service.

Figure 1. Both options are neutral: this is not "good and bad" but different project profiles.

The most important factor is often not technical but historical: what already exists on the project. A large stable Cypress suite with people who know it has a value that a rewrite rarely pays back. For a new project without such a legacy Playwright is usually the default today, but Cypress stays a fitting choice for teams that value its developer experience.

Example: five situations.

SituationChoiceWhy
800 Cypress tests exist, the team knows themKeep CypressA rewrite costs more than it gains
New project, SPA, frontend developersCypress or PlaywrightTeam experience decides
A scenario with two users in different tabsPlaywrightCypress has one tab
A Safari-like engine is neededPlaywrightWebKit in Cypress is experimental
QA writes in Python or JavaPlaywrightCypress is JS/TS only

Note the second row: it has no single answer. A good candidate does not invent one here but names what will decide it: team experience and what the CI already does.

Limits and alternatives. Both tools keep changing: what was a limitation a year ago (network, browsers, parallelism) may have changed. So in an answer it is worth saying "according to the current documentation". Cypress does not fit when scenarios with several tabs or Safari are needed. Playwright does not fit when the team consists entirely of frontend developers who value the interactive Test Runner, but even then the difference is not critical. Finally, "both" is also an option: Cypress for components, Playwright for end-to-end scenarios.

Typical mistakes.

  • Choosing by popularity or novelty without asking about the team and the scenarios.
  • Suggesting a rewrite of a working suite only because "Playwright is better".
  • Attributing limits from old versions to Cypress without checking the documentation.
  • Not naming what would change the decision: in an interview this looks like having no criteria.

Check yourself

A project has a large stable Cypress suite. You are asked to propose rewriting everything in Playwright. What do you say?

Answer

A rewrite alone is not justified: it is expensive and the gain is unclear. I would ask what concrete pain there is (several tabs, WebKit, speed), and if there is none I would keep Cypress. New scenarios that Cypress does not fit can be written in Playwright alongside.

Name two scenarios where Cypress does not fit.

Answer

A scenario with several tabs or several users at once, and a need for WebKit as a real Safari-like engine. Also a team that writes tests not in JavaScript or TypeScript.

In the interview. Junior: Cypress fits when the app is a single-page app on one domain and the tests are written together with frontend developers who like time-travel and component tests. Component testing does not decide the choice: Playwright has it too (in Playwright Test for JS/TS), where a built-in mount fixture in @playwright/test and a story gallery replace the removed experimental packages. For a new project without an existing suite Playwright is the more common pick, but team experience decides. Middle/Senior: I choose by constraints: scenarios (tabs, users, domains), who writes the tests, what already exists on the project, which browsers are needed. If there is a large stable Cypress suite and the team knows it, I would not rewrite it without a concrete problem. New scenarios that Cypress does not cover I add in Playwright.

More articles in this chapter