This is a Playwright-based API Test Automation Framework built using JavaScript. It is designed to validate REST API endpoints from the Reqres.in API, covering full CRUD operations and authentication workflows. The project demonstrates how to perform API testing using Playwright's request context and is suitable for both learning and showcasing in portfolios.
- Automate key API workflows using Playwright’s request fixture
- Validate HTTP methods: GET, POST, PUT, DELETE
- Cover positive and negative test validations
- Ensure readable, reusable and scalable test code
- Prepare a CI-ready, beginner-friendly automation project
-
GET Requests
Validates user detail retrieval with status and field-level checks -
POST Requests
- Create new user
- Successful login
- Failed login (missing password)
- Successful registration
-
PUT Requests
- Update user name and job, validate response and timestamp
-
DELETE Requests
- Delete user and assert status code 204 (No Content)
-
Install dependencies
npm install
-
Run all tests
npx playwright test
-
View the HTML report
npx playwright show-report
- Framework: Playwright (JavaScript)
- Test Type: API Testing (using request context)
- Base API: https://reqres.in
- Language: JavaScript (CommonJS)
- Runner: Playwright Test
- Reporting: Built-in HTML Reporter
- Introduce reusable API utility functions for cleaner code
- Add
.env
support for managing base URLs and tokens - Integrate GitHub Actions for CI-based test execution
- Explore Allure Reporting for advanced test reports