Complete Course

Basics of API Testing with Playwright

Get started with API testing using Playwright: test a real REST endpoint, its query parameters, and its error scenarios, then run on CI.

Course Content

9 comprehensive lessons covering everything you need to know

Introduction

Introduction
Course Structure
Learn how the course is organized and make the most of the content.
Introduction
Prerequisites
Systems and knowledge required to complete the course.
Introduction
Getting to know the application under test
Learn about the EngageSphere Customers API that will be tested throughout the course.
Lesson
Lesson 1
Fork, clone, and set up Playwright
Fork, clone, run the API with Docker, and configure Playwright for API testing.

Happy path

Lesson
Lesson 2
Writing a happy-path test
Send a GET request and assert on the status code and body structure.

Query parameters

Lesson
Lesson 3
Query parameter: page
Test the page query parameter and assert on the current page.
Lesson
Lesson 4
Query parameter: limit
Test the limit query parameter and assert on the collection size.
Lesson
Lesson 5
Query parameter: size
Test the size filter and assert that every customer matches it.
Lesson
Lesson 6
Query parameter: industry
Test the industry filter and assert that every customer matches it.

Error scenarios

Lesson
Lesson 7
Error scenarios
Assert on 400 Bad Request responses for invalid parameter values.

Running tests and CI

Lesson
Lesson 8
Running API tests in headless mode
Run, filter, and report on your API tests.
Lesson
Lesson 9
Running tests on GitHub Actions
Run your Playwright API tests in a continuous integration pipeline.

Bonus & Conclusion

Bonus
Bonus: Playwright MCP for API testing
Use the Playwright MCP to let an AI assistant help you explore and test the API.
Conclusion
Congratulations!
You've completed the Basics of API Testing with Playwright course!