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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
50
CSS Specificity
silvenon
0
48
Make your JavaScript projects more accessible to newcomers
silvenon
0
81
React Hooks
silvenon
0
85
PostCSS
silvenon
0
47
CSS Custom Properties
silvenon
0
47
Maintainable Integration Testing in React
silvenon
0
51
Other Decks in Programming
See All in Programming
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
560
CSC307 Lecture 15
javiergs
PRO
0
260
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
640
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
420
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
240
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
オブザーバビリティ駆動開発って実際どうなの?
yohfee
4
870
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
340
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
300
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
20260315 AWSなんもわからん🥲
chiilog
2
160
Featured
See All Featured
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Raft: Consensus for Rubyists
vanstee
141
7.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
78
From π to Pie charts
rasagy
0
150
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
320
Believing is Seeing
oripsolob
1
86
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
460
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
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 🥳