A professional API testing project demonstrating backend QA skills using Playwright's built-in API testing capabilities. Covers all five core HTTP methods with positive, negative, and edge case test scenarios — fully automated via GitHub Actions CI/CD.
| Skill | How It's Shown |
|---|---|
| API test automation | Playwright request context — no browser needed |
| HTTP method coverage | GET, POST, PUT, PATCH, DELETE |
| Test type coverage | Positive, Negative, Edge Case, Schema validation |
| Status code validation | Every test asserts the correct HTTP status code |
| Response body validation | Field values and data types are checked |
| Schema validation | Verifying field names and data types on response objects |
| Negative testing | Non-existent IDs, empty payloads, boundary values |
| CI/CD | GitHub Actions runs tests automatically on every push |
| Documentation | Test cases, bug reports, and API examples in /docs |
- Playwright — API testing framework (JavaScript)
- Node.js — Runtime (v18+)
- JSONPlaceholder — Free public REST API used as the system under test
- GitHub Actions — CI/CD pipeline
JSONPlaceholder (https://jsonplaceholder.typicode.com) is a free, reliable, public REST API
used widely for testing and prototyping. It provides standard CRUD endpoints with no authentication
required — making it ideal for portfolio and demo projects.
Resources tested: /posts, /posts/:id, /posts/:id/comments
| File | HTTP Method | Tests | What's Covered |
|---|---|---|---|
tests/get.spec.js |
GET | 16 | List all, fetch one, nested resources, 404 cases, schema |
tests/post.spec.js |
POST | 8 | Create, field validation, edge inputs |
tests/put.spec.js |
PUT | 6 | Full update, response validation, non-existent ID |
tests/patch.spec.js |
PATCH | 7 | Partial update, field preservation, non-existent ID |
tests/delete.spec.js |
DELETE | 7 | Delete, empty response body, invalid IDs |
| Total | 44 |
api-testing-portfolio/
├── .github/
│ └── workflows/
│ └── api-tests.yml # GitHub Actions CI pipeline
├── tests/
│ ├── get.spec.js # GET tests — fetch all, single, nested
│ ├── post.spec.js # POST tests — create resource
│ ├── put.spec.js # PUT tests — full update
│ ├── patch.spec.js # PATCH tests — partial update
│ └── delete.spec.js # DELETE tests — remove resource
├── docs/
│ ├── api-test-cases.md # Complete test case table (all 43 cases)
│ ├── sample-bug-reports.md # Example bug reports written as a QA Engineer would
│ └── example-requests-responses.md # Real API request/response examples + curl commands
├── playwright.config.js # Playwright configuration
├── package.json
└── README.md
- Node.js v18 or later
- npm
git clone https://github.com/YOUR_USERNAME/api-testing-portfolio.git
cd api-testing-portfolio
npm install
npx playwright install chromiumnpm testnpm run test:listnpm run reportThe HTML report opens in your browser and shows a full breakdown of every test — passed, failed, and the response data for each request.
Every push to main automatically triggers the test suite via GitHub Actions.
Pipeline steps:
- Check out code
- Set up Node.js 20
- Install npm dependencies
- Install Playwright
- Run all API tests
- Upload HTML report as a build artifact (retained for 14 days)
See the full workflow: .github/workflows/api-tests.yml
| File | Contents |
|---|---|
docs/api-test-cases.md |
Full test case table with IDs, types, and expected results |
docs/sample-bug-reports.md |
Four realistic bug reports in professional QA format |
docs/example-requests-responses.md |
Raw request/response examples and curl commands |
- qa-automation-playwright-portfolio — UI test automation using Playwright with Page Object Model
