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
OTP を自動で入力する裏技
megabitsenmzq
0
120
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
120
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
170
Ruby and LLM Ecosystem 2nd
koic
1
1.2k
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
110
SourceGeneratorのマーカー属性問題について
htkym
0
210
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
240
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
410
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
280
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
310
Designing Experiences People Love
moore
143
24k
Become a Pro
speakerdeck
PRO
31
5.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Six Lessons from altMBA
skipperchong
29
4.2k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Bash Introduction
62gerente
615
210k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
WENDY [Excerpt]
tessaabrams
9
37k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
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 🥳