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
180
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
36
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
29
Introduction to Remix
silvenon
0
170
Studying Strapi: an open source head headless CMS
silvenon
0
58
CSS Specificity
silvenon
0
64
Make your JavaScript projects more accessible to newcomers
silvenon
0
97
React Hooks
silvenon
0
98
PostCSS
silvenon
0
67
CSS Custom Properties
silvenon
0
59
Other Decks in Programming
See All in Programming
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
220
Hono + Inertia + React で LP を構築した話
oukayuka
2
180
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
1
370
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
200
ALB ログから Trace を気合で繋げる技術
fohte
7
770
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
2.3k
My Marp Sample
sinoue0108
0
130
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
Oxlintはいいぞ(続)
yug1224
1
480
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
780
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
520
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
970
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
AI: The stuff that nobody shows you
jnunemaker
PRO
9
950
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
670
KATA
mclloyd
PRO
35
15k
How STYLIGHT went responsive
nonsquared
100
6.2k
A Tale of Four Properties
chriscoyier
163
24k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
480
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
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 🥳