How to test and monitor your APIs with Playwright

  Рет қаралды 3,124

Checkly

Checkly

Күн бұрын

In today's video, we explore a lesser-known feature of Microsoft's Playwright - API Testing.
We'll illustrate how to use Playwright for testing GraphQL as an example of an HTTP-based API; RESTful APIs can be tested too. We'll explain the usage of the 'request' fixture with Playwright, parse responses and validate their correctness.
Moreover, we'll delve into executing multiple API requests in a single Playwright test case while testing their responses.
A bonus tip we'll share is how to reuse your Playwright code with Checkly's new multistep checks for efficient production monitoring.
Questions? Feel free to drop them below. See you in the next video!
Playwright API testing docs: playwright.dev/docs/api-testing
Checkly Multistep Check docs: www.checklyhq.com/docs/multis...
00:00 Intro
00:19 GraphQL example API
01:35 The API testing test case
02:26 Making requests with the `request` fixture
03:17 Access the response body
03:43 Configuring Playwright projects
04:17 Adding assertions to your API tests
05:39 Making multiple requests in a single test case
06:06 Filter countries via GraphQL
08:23 Playwright API monitoring
09:29 Outro
#playwright #monitoring #apitesting #syntheticmonitoring #checkly

Пікірлер: 12
@_unreal_engineer
@_unreal_engineer 3 ай бұрын
i love checkly
@uvitalkumar
@uvitalkumar 3 ай бұрын
Hope more videos on GraphQL API testing using Playwright
@ChecklyHQ
@ChecklyHQ 3 ай бұрын
Let's see what we can do. :) Do you have any specific topics in mind?
@epicgamers1998
@epicgamers1998 19 күн бұрын
Graphql api automation using bdd
@tiagosutter8821
@tiagosutter8821 2 ай бұрын
Thanks, that is interesting, i might use Playwright to test APIs as well since i'll be already using to e2e tests. Is it using a browser under the hood while API testing though? I hope not, as i don't see the need to have a browser context for that
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
I'm pretty sure `request` doesn't spin up a browser. :)
@_unreal_engineer
@_unreal_engineer 3 ай бұрын
Hello, which tool do you use for auto complete ? Thank for everything
@ChecklyHQ
@ChecklyHQ 3 ай бұрын
It's Github's Copilot. :)
@Matkotech
@Matkotech 3 ай бұрын
Great content! Can you make video API Authentication to bypass UI login. Ty! Cheers ☺️
@ChecklyHQ
@ChecklyHQ 3 ай бұрын
Let's check if I understand correctly: you would like to watch a video that shows how to login via HTTP and then pass the session data to a browser session to save time?
@carldmitch
@carldmitch 3 ай бұрын
@@ChecklyHQ perhaps Matko wants to see how to use global-setup where you can login and save the storageState.json, then load the storageStage before all the tests thus bypassing subsequent login flows.
@Matkotech
@Matkotech 3 ай бұрын
@@ChecklyHQ Yeah, to perform auth via API post req and then use that session in test to save time
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 10 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 82 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 791 М.
Performance Testing using Playwright
1:05:47
NY Web Performance Meetup
Рет қаралды 18 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1 МЛН
Reuse Playwright  Code across Files and Tests with Fixtures
5:54
Mastering API Testing & Playwright: Expert Tips Revealed!
46:40
Automation Testing with Joe Colantonio
Рет қаралды 1,2 М.
Playwright API Testing Demo for Beginners
34:31
Automation Step by Step
Рет қаралды 30 М.
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,9 МЛН
Telefonu Parçaladım!😱
0:16
Safak Novruz
Рет қаралды 26 МЛН
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 27 МЛН