Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cypress vs. Playwright
Search
Matija Marohnić
September 28, 2022
Programming
0
160
Cypress vs. Playwright
Matija Marohnić
September 28, 2022
Tweet
Share
More Decks by Matija Marohnić
See All by Matija Marohnić
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
5
Introduction to Remix
silvenon
0
140
Studying Strapi: an open source head headless CMS
silvenon
0
41
CSS Specificity
silvenon
0
32
Make your JavaScript projects more accessible to newcomers
silvenon
0
76
React Hooks
silvenon
0
74
PostCSS
silvenon
0
45
CSS Custom Properties
silvenon
0
40
Maintainable Integration Testing in React
silvenon
0
34
Other Decks in Programming
See All in Programming
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
250
Webサーバーサイド言語としてのRustについて
kouyuume
1
5.1k
モテるデスク環境
mozumasu
3
1.4k
MCPサーバー「モディフィウス」で変更容易性の向上をスケールする / modifius
minodriven
4
700
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.7k
AI駆動開発カンファレンスAutumn2025 _AI駆動開発にはAI駆動品質保証
autifyhq
0
120
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.9k
Researchlyの開発で参考にしたデザイン
adsholoko
0
110
CSC305 Lecture 10
javiergs
PRO
0
330
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
2
320
ドメイン駆動設計のエッセンス
masuda220
PRO
15
7.4k
CSC509 Lecture 09
javiergs
PRO
0
280
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Documentation Writing (for coders)
carmenintech
76
5.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
Building Adaptive Systems
keathley
44
2.8k
A Modern Web Designer's Workflow
chriscoyier
697
190k
How to Ace a Technical Interview
jacobian
280
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
Visualization
eitanlees
150
16k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Facilitating Awesome Meetings
lara
57
6.6k
Transcript
Matija Marohnić Cypress vs. Playwright End-to-end testing showdown https://silvenon.com/blog/e2e-testing-with-cypress-vs-playwright
My experience with Cypress
Background • prior experience with tools like WebdriverIO • used
Cypress for a long time • friendlier API • approachable • but eventually mostly for critical functionality
Speed • 5 tests = 45s (locally) • compared to
my other optimizations it became uncomfortable • started writing less tests 💔
GUI 🤷
GUI
API • familiarity = jQuery 😔 • won’t look familiar
to any new developers
API • should = expect
API • wrap objects to make assertions • another round
of jQuery for everyone! 🍻
API • synchronous…? • commands are queued to be run
later
Meet Playwright 🎭
Background • new testing framework by Microsoft • haven’t used
it in any serious projects yet • only side projects
Supports WebKit • unlike Cypress, Playwright supports Safari • Safari’s
support table can be uncomfortable, so it’s really useful
Headless by default • seemed odd at fi rst •
turned out to be a great feature • less clutter, no dashboards or browsers • run headed only when you need to debug
Speed • 13 tests = 3s ⚡ • more than
2x as many tests = 15x faster • speed is no longer an issue • started testing every square inch of my blog
API • asynchronous, almost everything needs to be awaited
API • at fi rst repetitive and error-prone, mistakes aren’t
always obvious • but gives full control over execution order, more transparent
API • uses Jest’s expect library for assertions, so looks
more like a unit test • doesn’t need a Testing Library plugin, locators are powerful
VS Code extension 🤯 • killer feature • makes Playwright
really e ffi cient to use! • run a test just by clicking on it, and much more • a more balanced approach to GUI — stay in your text editor • 👨💻
…and so much more!
• I’m always excited to learn more about Playwright •
it makes me want to write more tests 🥳