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
40
Maintainable Integration Testing in React
silvenon
0
48
Other Decks in Programming
See All in Programming
AtCoder Conference 2025
shindannin
0
1k
CSC307 Lecture 06
javiergs
PRO
0
680
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Fragmented Architectures
denyspoltorak
0
150
高速開発のためのコード整理術
sutetotanuki
1
390
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
690
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
AI巻き込み型コードレビューのススメ
nealle
0
120
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AI & Enginnering
codelynx
0
110
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Rails Girls Zürich Keynote
gr2m
96
14k
My Coaching Mixtape
mlcsv
0
46
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Ethics towards AI in product and experience design
skipperchong
2
190
Claude Code のすすめ
schroneko
67
210k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
A Tale of Four Properties
chriscoyier
162
24k
Six Lessons from altMBA
skipperchong
29
4.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
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 🥳