Stop 14 · Build Your QA PortfolioProjects · 3/7

API Automation Testing Project

Part of the QA Testing Roadmap

In short

API tests run in seconds and catch bugs before the UI even exists. A solid API project, with auth, negative cases and clean reports, shows you understand what really happens behind the screen.

A polished, well-documented API test suite showcasing Phase 8's skills — comprehensive coverage of endpoints, authentication scenarios, and both positive and negative test cases.

The purple blob weighs a parcel on a scale at a post office counter, with more parcels waiting.

Think of it like this

The post office counter

The clerk weighs each parcel, checks the address and stamp, and rejects anything wrong before it travels. API tests are that counter: check every request and response at the source, before bad data reaches any screen.

Watch it happen

What your suite checks on a practice booking API

Test suite
Booking API

POST /auth

1/6Log in with the practice API's test credentials to get a token.

The big ideas

What you need to know

Cover CRUD

Create, read, update and delete for at least one resource, each with positive and negative cases.

Auth scenarios

Valid token, missing token, expired or wrong token. These find real bugs in real APIs.

Check the body

Assert on fields, types and values, not just the status code. A 200 with wrong data is still a bug.

Runs in CI

API suites are fast, which makes them perfect for every pull request.

See it in code

Walk through the code

ts
1import { test, expect } from "@playwright/test";2 3test("create booking returns the saved booking", async ({ request }) => {4  const res = await request.post("/booking", {5    data: { firstname: "Riya", lastname: "Shah", totalprice: 2500, depositpaid: true,6            bookingdates: { checkin: "2026-12-01", checkout: "2026-12-03" } },7  });8  expect(res.status()).toBe(200);9  const body = await res.json();10  expect(body.booking.firstname).toBe("Riya");11  expect(body.bookingid).toBeGreaterThan(0);12});

1/3Send a POST with a full booking payload as JSON.

Set baseURL to https://restful-booker.herokuapp.com in playwright.config.ts. It's a free practice API built for testers.

Save yourself the pain

Common mistakes

Oops

Only asserting status codes.

Do this instead

Assert on the response body and, where you can, fetch the record again to confirm it was really saved.

Oops

Tests that depend on booking 1 existing on a shared practice server.

Do this instead

Create the data your test needs inside the test, then use its ID.

Your mission

First three API tests

~40 min

Quick check

An API returns 200 OK but the response body has the wrong price. Did the test pass?

Go deeper

  1. 1Choose a public API or build a simple one to test against.
  2. 2Cover positive, negative, and boundary test scenarios comprehensively.
  3. 3Integrate the suite into a CI pipeline and document how to run it.

More projects at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge