$30 off During Our Annual Pro Sale. View Details »
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
160
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
9
Introduction to Remix
silvenon
0
140
Studying Strapi: an open source head headless CMS
silvenon
0
45
CSS Specificity
silvenon
0
35
Make your JavaScript projects more accessible to newcomers
silvenon
0
76
React Hooks
silvenon
0
81
PostCSS
silvenon
0
45
CSS Custom Properties
silvenon
0
40
Maintainable Integration Testing in React
silvenon
0
44
Other Decks in Programming
See All in Programming
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
730
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
Developing static sites with Ruby
okuramasafumi
0
310
ゲームの物理 剛体編
fadis
0
350
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
GISエンジニアから見たLINKSデータ
nokonoko1203
0
170
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
410
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
140
JETLS.jl ─ A New Language Server for Julia
abap34
1
420
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.8k
Graviton と Nitro と私
maroon1st
0
110
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
130
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
2
200
Git: the NoSQL Database
bkeepers
PRO
432
66k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
0
38
Music & Morning Musume
bryan
46
7k
Documentation Writing (for coders)
carmenintech
77
5.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Making Projects Easy
brettharned
120
6.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
170
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
83
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
20
GraphQLとの向き合い方2022年版
quramy
50
14k
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 🥳