playwrithgttttttttttttttttttttttSlides.pdf

SarvjeetKumarSingh1 21 views 13 slides Sep 18, 2024
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

playwright


Slide Content

Awesome Web Testing
with Playwright
Pandy Knight
@AutomationPanda

Tutorial Repository
https://github.com/
AutomationPanda/
awesome-web-testing-playwright
Handle tutorial setup now!

Who likes to find
problems in their code?

Who would rather ship
those bugs to prod?

Now who wants to create
the tests for that feedback?

Testing challenges
Testing is HARD!
What challenges have y’all faced?

Testing challenges
●Tests are slow
●Tests are brittle
●Tests are flaky
●Tests don’t make sense
●Tests don’t make money
●Tests requires changing context

That Pyramid Scheme
Unit
Component
API
UI

Modern Testing Goals
1.Focus on building fast feedback loops rather than certain types of tests.

2.Make test development as fast and painless as possible.

3.Choose test tooling that naturally complements dev workflows.

Playwright can help.

Playwright
●A modern, open source web test framework from Microsoft
●Manipulates the browser via (superfast) debug protocols
●Works with Chromium/Chrome/Edge, Firefox, & WebKit
●Provides automatic waiting, test generation, UI mode, etc.
●Can test UIs and APIs together
●Bindings for JavaScript, Python, Java, & C#
○TypeScript is recommended

Browsers, contexts, and pages

Browser automation tool comparison
Selenium Cypress Playwright
Popular among testers Popular among developers So hot right now
C#, Java, JavaScript, Ruby, Python JavaScript only C#, Java, JavaScript, Python
All major full browsers Chrome, Edge, Firefox, Electron Chromium+, Firefox, WebKit
WebDriver protocol In-browser JavaScript Debug protocols
Just a tool – requires a framework Full, modern framework Full, modern framework
Can be slow/flaky if waiting is poorVisual execution but can be slow Typically the fastest execution
Open source, standards, & gov Open source from Cypress Open source from Microsoft