Playwright Tutorial | Get Call for API Testing with Playwright | Pass BaseURL and Headers

Описание к видео Playwright Tutorial | Get Call for API Testing with Playwright | Pass BaseURL and Headers

Get Call covering different ways to pass Base URL and Header,
API Testing with UI,
Pass Resource, Path Parameter and Query Parameters

#playwright #typescript #javascript #tutorial #automation #testing #coding #selenium #cypress
playwright, playwright tutorial, playwright testing

===============================================================================
Chapters

00:00 - Introduction Of API Get Call
02:05 - Postman tool details and perform Basic Get Call using postman
07:27 - Perform Basic get call for API Testing
09:52 - Different ways to pass BaseURL
20:12 - Different ways to pass Headers
27:20 - Perform Get call with Path Parameter
31:19 - Perform Get call with Query Parameters
36:21 - Assetions on API response
49:04 - Validate API with UI
59:15 - Recap
================================================================================

Playwright with TypeScript / JavaScript Series -    • Playwright Tutorials with TypeScript ...  
Playwright API Testing -    • Playwright Tutorials with TypeScript ...  
Introduction of API -    • Playwright Tutorial |  Introduction o...  
Learn Playwright in 60 Seconds (Shorts Playlist) -    • Learn Playwright in 60 Seconds  
Playwright Notes - https://docs.google.com/document/d/1O...

============================================================================================================

Playwright with TypeScript | Get Call For API Testing

API testing is crucial for ensuring the smooth functioning and overall quality of web applications that rely on Application Programming Interfaces (APIs).
It checks if the API delivers the correct data in the expected format when provided with valid inputs.
API Testing also involves invalid inputs to ensure the API handles errors gracefully and returns appropriate messages.


Get Call -
A GET call in an API (Application Programming Interface) is a specific type of HTTP request method used to retrieve data from a server.
When you make a GET call, you are essentially asking the server for information. The server responds by sending back the requested data in the response body.
The data format can vary depending on the API, but common formats include JSON (JavaScript Object Notation) and XML (Extensible Markup Language).

Components to use -
BaseURL + Resource + Query and/or Path Params
Header (if required)

4 Ways to Provide baseURL -
With HTTP Method.
By using request context in Test block
By Using request context in with beforeAll
In Playwright.config.ts file

Assertions -

expect(resp.status()).toBe(200);
expect(resp.OK()).toBeTruthy();
expect(await resp.json()).toMatchObject({
firstname: 'Jane',
lastname: 'Doe',
totalprice: 111,
depositpaid: true,
bookingdates: { checkin: '2018-01-01', checkout: '2019-01-01' },
additionalneeds: 'Extra pillows please'
})


expect((await resp.json()).firstname).toBe("Jane1")

Комментарии

Информация по комментариям в разработке