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
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
29
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
19
Introduction to Remix
silvenon
0
160
Studying Strapi: an open source head headless CMS
silvenon
0
55
CSS Specificity
silvenon
0
62
Make your JavaScript projects more accessible to newcomers
silvenon
0
91
React Hooks
silvenon
0
93
PostCSS
silvenon
0
65
CSS Custom Properties
silvenon
0
52
Other Decks in Programming
See All in Programming
Oxcを導入して開発体験が向上した話
yug1224
4
280
エージェンティックRAGにAWSで入門しよう!
har1101
5
110
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
240
AI時代のUIはどこへ行く?その2!
yusukebe
19
6.5k
AIエージェントの隔離技術の徹底比較
kawayu
0
460
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
160
CSC307 Lecture 17
javiergs
PRO
0
310
LLM Plugin for Node-REDの利用方法と開発について
404background
0
160
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
850
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
5.2k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
560
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
470
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Navigating Team Friction
lara
192
16k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
My Coaching Mixtape
mlcsv
0
140
Exploring anti-patterns in Rails
aemeredith
3
390
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
The SEO Collaboration Effect
kristinabergwall1
1
470
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Are puppies a ranking factor?
jonoalderson
1
3.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
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 🥳