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
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
31
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
24
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
93
React Hooks
silvenon
0
95
PostCSS
silvenon
0
66
CSS Custom Properties
silvenon
0
55
Other Decks in Programming
See All in Programming
霧の中の代数的エフェクト
funnyycat
1
390
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
Performance Engineering for Everyone
elenatanasoiu
0
270
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
180
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
自作OSでスライド発表する
uyuki234
1
3.8k
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
500
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
120
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
230
どこまでゆるくて許されるのか
tk3fftk
0
490
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
640
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.4k
Agile that works and the tools we love
rasmusluckow
331
22k
Discover your Explorer Soul
emna__ayadi
2
1.2k
What's in a price? How to price your products and services
michaelherold
247
13k
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
250
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
490
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.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 🥳