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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Matija Marohnić
September 28, 2022
Programming
0
170
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
10
Introduction to Remix
silvenon
0
150
Studying Strapi: an open source head headless CMS
silvenon
0
49
CSS Specificity
silvenon
0
47
Make your JavaScript projects more accessible to newcomers
silvenon
0
80
React Hooks
silvenon
0
85
PostCSS
silvenon
0
46
CSS Custom Properties
silvenon
0
43
Maintainable Integration Testing in React
silvenon
0
50
Other Decks in Programming
See All in Programming
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
270
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
190
CSC307 Lecture 12
javiergs
PRO
0
450
CSC307 Lecture 13
javiergs
PRO
0
310
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
12
7.1k
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
5
1.1k
浮動小数の比較について
kishikawakatsumi
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
320
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
190
Metaprogramming isn't real, it can't hurt you
okuramasafumi
0
130
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
900
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
180
BBQ
matthewcrist
89
10k
Producing Creativity
orderedlist
PRO
348
40k
Odyssey Design
rkendrick25
PRO
2
520
30 Presentation Tips
portentint
PRO
1
240
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
370
4 Signs Your Business is Dying
shpigford
187
22k
Design in an AI World
tapps
0
160
The SEO identity crisis: Don't let AI make you average
varn
0
400
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
130
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 🥳