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
Playwright can do this?
Search
stefan judis
March 30, 2023
Technology
0
180
Playwright can do this?
Learn why Microsoft's testing framework is a stellar solution to test your sites end-to-end.
stefan judis
March 30, 2023
Tweet
Share
More Decks by stefan judis
See All by stefan judis
Back to boring (part 2)
stefanjudis
0
290
Things you should know about Frontend Development in 2022
stefanjudis
0
500
Throw yourself out there for fun and profit
stefanjudis
0
94
Back to Boring
stefanjudis
1
450
Wanna scale up? Make sure your CMS is ready for it!
stefanjudis
0
230
Did we(b development) lose the right direction?
stefanjudis
6
2.2k
Regular expressions – my secret love
stefanjudis
1
1k
Write a Function
stefanjudis
0
560
React in a worker, worker, worker...
stefanjudis
2
550
Other Decks in Technology
See All in Technology
CSPヘッダー導入で実現するWebサイトの多層防御:今すぐ試せる設定例と運用知見
llamakko
1
280
[MIRU25] NaiLIA: Multimodal Retrieval of Nail Designs Based on Dense Intent Descriptions
keio_smilab
PRO
1
150
AIエージェントを支える設計
tkikuchi1002
12
2.5k
データエンジニアがクラシルでやりたいことの現在地
gappy50
3
770
AI によるドキュメント処理を加速するためのOCR 結果の永続化と再利用戦略
tomoaki25
0
220
増え続ける脆弱性に立ち向かう: 事前対策と優先度づけによる 持続可能な脆弱性管理 / Confronting the Rise of Vulnerabilities: Sustainable Management Through Proactive Measures and Prioritization
nttcom
1
230
解消したはずが…技術と人間のエラーが交錯する恐怖体験
lamaglama39
0
140
人と生成AIの協調意思決定/Co‑decision making by people and generative AI
moriyuya
0
220
【Λ(らむだ)】最近のアプデ情報 / RPALT20250729
lambda
0
160
Kiroから考える AIコーディングツールの潮流
s4yuba
2
520
完璧を目指さない小さく始める信頼性向上
kakehashi
PRO
0
120
MCPに潜むセキュリティリスクを考えてみる
milix_m
1
920
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
A Modern Web Designer's Workflow
chriscoyier
695
190k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Side Projects
sachag
455
43k
GraphQLとの向き合い方2022年版
quramy
49
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Building Applications with DynamoDB
mza
95
6.5k
Transcript
@stefanjudis Playwright can do this?
Does anyone remember this friend?
Or this one?
@stefanjudis stefanjudis.com | webweekly.email Heyo, I'm Stefan! checklyhq.com GDE |
Playwright Ambassador
webweekly.email
The idea of end-to-end testing was great!
But it was terrible.
Tests were slow, hard to write and fl aky.
We run the tests on demand. My colleagues & I
We gave up. :/ My colleagues & I
Things got a lot better
Playwright is cross-everything
Playwright is cross-everything
Run your tests in VS Code
Very solid typings
More than a browser control / / @ts - check
import { test, expect } from "@playwright/test"; test.describe("navigation", () = > { test.beforeEach(async ({ page }) = > { / / Go to the starting url before each test. await page.goto("https: / / playwright.dev/"); }); test("main navigation", async ({ page }) = > { / / Assertions use the expect API. await expect(page).toHaveURL("https: / / playwright.dev/"); }); });
Easy to parallelize npx playwright test - - workers 4
/ / playwright.conf i g.js import { def i neConf i g } from '@playwright/test'; export default def i neConf i g({ workers: process.env.CI ? 2 : undef i ned, })
Built for quick execution const button = page.locator('button') await button.click()
await expect(button).toBeHidden() Auto-wait and web- fi rst assertions make waitFor statements redundant.
A very fast release cycle
Let's have a look!
Auto-wait Web- fi rst assertions Screenshots Test runner Retries Tracing
VS Code extension Inspector Debugger Codegen Image Snapshots Native UI
Weekly Playwright tips youtube.com/checklyhq
There's no silver bullet when it comes to e2e testing...
... but Playwright is a stellar solution!
Treat your UIs like your APIs.
APIs are measured with the number of nines — 99.999%.
Your entire application should be tested all the time!
Account create Account login Account update Account delete 99.999% 99.1%
99.8% 99.94% Stellar frontends with con fi dence
blog.checklyhq.com/how-playwright-can-monitor-third-party-resources/
End-to-end monitoring should be your safety net.* * Your future-self
will thank you!
Start shipping with con fi dence! * Your future-self will
thank you!
@stefanjudis www.stefanjudis.com webweekly.email Thanks!