Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cypress vs. Playwright
Search
Matija Marohnić
September 28, 2022
Programming
190
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
54
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
37
Introduction to Remix
silvenon
0
180
Studying Strapi: an open source head headless CMS
silvenon
0
70
CSS Specificity
silvenon
0
80
Make your JavaScript projects more accessible to newcomers
silvenon
0
110
React Hooks
silvenon
0
110
PostCSS
silvenon
0
76
CSS Custom Properties
silvenon
0
76
Other Decks in Programming
See All in Programming
sbt 2.0: takeoff
eed3si9n
0
190
AI Augmentation Techniques with Liberty
ivargrimstad
0
300
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
250
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
250
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
340
No More NoSuchMethodError
exoego
1
120
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
120
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.1k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.4k
SODA - FACT BOOK(EN)
sodainc
1
200
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
Writing Fast Ruby
sferik
630
63k
Mobile First: as difficult as doing things right
swwweet
225
10k
ラッコキーワード サービス紹介資料
rakko
5
5.6M
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Into the Great Unknown - MozCon
thekraken
41
2.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
The browser strikes back
jonoalderson
0
1.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
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 🥳