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
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
49
CSS Specificity
silvenon
0
47
Make your JavaScript projects more accessible to newcomers
silvenon
0
80
React Hooks
silvenon
0
85
PostCSS
silvenon
0
46
CSS Custom Properties
silvenon
0
43
Maintainable Integration Testing in React
silvenon
0
50
Other Decks in Programming
See All in Programming
文字コードの話
qnighy
43
16k
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
230
AI活用のコスパを最大化する方法
ochtum
0
120
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
640
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
110
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜 / Understanding nil in Go Interface Representation and Why nil != nil
kuro_kurorrr
3
1.6k
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
120
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.6k
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
3
380
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
450
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
120
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
460
Information Architects: The Missing Link in Design Systems
soysaucechin
0
810
The Cost Of JavaScript in 2023
addyosmani
55
9.7k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Un-Boring Meetings
codingconduct
0
220
Darren the Foodie - Storyboard
khoart
PRO
3
2.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
280
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
180
My Coaching Mixtape
mlcsv
0
63
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 🥳