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
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cypress vs. Playwright
Matija Marohnić
September 28, 2022
More Decks by Matija Marohnić
See All by Matija Marohnić
oxlint & oxfmt: linting and formatting from the future
silvenon
0
30
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
23
Introduction to Remix
silvenon
0
160
Studying Strapi: an open source head headless CMS
silvenon
0
57
CSS Specificity
silvenon
0
64
Make your JavaScript projects more accessible to newcomers
silvenon
0
92
React Hooks
silvenon
0
95
PostCSS
silvenon
0
65
CSS Custom Properties
silvenon
0
53
Other Decks in Programming
See All in Programming
The NotImplementedError Problem in Ruby
koic
1
920
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
190
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
180
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.4k
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
130
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
AI 輔助遺留系統現代化的經驗分享
jame2408
1
970
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
300
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.5k
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
Tell your own story through comics
letsgokoyo
1
960
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
860
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Rails Girls Zürich Keynote
gr2m
96
14k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
The Spectacular Lies of Maps
axbom
PRO
1
820
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
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 🥳