I’m always looking for ways to improve testing and team performance, as described in the book “Accelerate” having fast feedback is crucial for high-performing teams. So lately, I’ve come across numerous discussions where people are debating which test automation framework is the best. Some of the blogs I’ve been reading have made compelling arguments. However, at times, it felt like the authors of these comparisons were not fully up to date with the tools in question. Personally, my experience has mainly been with Cypress, so I naturally lean towards the framework I’m most familiar with. Still, I wanted to objectively compare these tools before making any judgments about Playwright, which some say isn’t as great as it’s claimed to be.

In this unbiased comparison, I’ll assess both tools without any affiliation to either product. My goal is to provide a clearer perspective on which tool might be the right choice for your upcoming project.

Required features for E2E testing

Programming LanguagesJavaScript, TypeScriptJavaScript, TypeScript, Python, and C#
Parallel testing:check_mark: (not possible on single instance, need multiple containers):check_mark: (up to 5 workers on a single instance)
Test execution speed:check_mark::check_mark: (playwright is generally faster)
CI/CD integration:check_mark::check_mark:
API testing:check_mark::check_mark:
Cross-browser testing:check_mark::check_mark:
Cross-origin testing:check_mark: (requires extra configuration):check_mark:
Cross tab testing:cross_mark::check_mark:
Clear documentation:check_mark::check_mark:
Out-of-the-box support for additional features (tracing, visual regression, etc.):cross_mark::check_mark:
Support for lair abstractions (API requests used by multiple projects):check_mark: (but over-complicated through plugins and aliases:check_mark:
Ease of writing tests in JS/TS (Promises vs Async/Await)PromisesAsync/Await
Configuration files:check_mark::check_mark:
Test runner before and after hooks:check_mark::check_mark:
Support for 3rd party packages:check_mark: (Cypress uses the concept of plugins which allows extending framework, but there is news that Cypress started limiting the flexibility due to competition with companies using third-party solutions for profit):check_mark:
Cloud integration:check_mark::check_mark:
Integration with observability tools:check_mark::check_mark:

Winner: Playwright

Conclusion: Playwright is faster, easier to debug, and provides parallel test execution on a single machine (container), more support for the functionalities that are important for E2E testing

UI Runner (Developer Experience)

Can run individual tests:cross_mark::check_mark:
Integrated with VSCode (makes easier to jump to the test):check_mark: (but not out of the box, requires setup):check_mark:
Integrated with VSCode (makes it easier to jump to the test):check_mark: (but for some of those you need to open dev tools which might not be obvious):check_mark:
Filtering tests (passed, failed, skipped):cross_mark::check_mark:

Winner: Playwright

Conclusion: In terms of UI runner, Playwright is a clear winner over Cypress. Playwright going to give faster feedback and a better developer experience, with no hustle to get additional information, everything leads to fast debugging and problem resolution if any. Although there are some things that you can do with Cypress as well, there is no “but” with Playwright, very intuitive and easy to use.

Additional features (nice to have)

Can run from the IDE (VSCode UI):cross_mark::check_mark:
Component testing:check_mark::check_mark: (experimental)
Code coverage:check_mark::check_mark:
Visual Regrssion Testing:check_mark: (need to be integrated with 3rd party):check_mark:

Winner: Playwright

Conclusion: Playwright provides more unique features, which makes better developer experience

Community support and the teams behind

Teams behindCypress (only profiting from cloud solution for reports)Microsoft
Community support
Dropping due to uncertainty on the company direction and missing features compared to Playwright
Gaining momentum, more and more positive feedback
NPM package downloads51720002100000
Stars on Github450482100000

Blogs and community feedback:

  1. Why I switched from Cypress to Playwright
  2. I’m big Cypress fan, so I’m shocked to say this: I just switched to Playwright
  3. Cypress has disabled several 3rd party NPM modules that competed with its Cypress Cloud commercial product.

Winner: Playwright

Conclusion: Playwright has a larger company behind it and the community seems to be moving towards a more stable company with a clear path and assurance for longer support

Key ImportanceCypressPlaywright
Required features for E2E testing🏆
UI Runner (Developer Experience)🏆
Additional features (nice to have)🏆
Community support and the teams behind🏆

In 2023, it’s clear that Playwright takes the lead. However, in the ever-evolving JavaScript landscape, things can shift quickly. What’s reassuring about Playwright is its solid backing by a stable company, which suggests ongoing support in the foreseeable future.