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
9
Introduction to Remix
silvenon
0
140
Studying Strapi: an open source head headless CMS
silvenon
0
48
CSS Specificity
silvenon
0
46
Make your JavaScript projects more accessible to newcomers
silvenon
0
78
React Hooks
silvenon
0
84
PostCSS
silvenon
0
45
CSS Custom Properties
silvenon
0
41
Maintainable Integration Testing in React
silvenon
0
48
Other Decks in Programming
See All in Programming
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Oxlint JS plugins
kazupon
1
910
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
690
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
Data-Centric Kaggle
isax1015
2
770
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
ぼくの開発環境2026
yuzneri
0
210
今から始めるClaude Code超入門
448jp
8
8.7k
2026年 エンジニアリング自己学習法
yumechi
0
130
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
74
Un-Boring Meetings
codingconduct
0
200
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Why Our Code Smells
bkeepers
PRO
340
58k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
53
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
[SF Ruby Conf 2025] Rails X
palkan
1
750
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
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 🥳