
Problem
Test a booking API end to end: authenticate, create a booking, read it back and partially update it, checking not just status codes but the actual values at every step.
Approach
- Four chained requests sharing collection variables: the auth token and the id of the booking the suite creates itself, so a run never depends on other people's data.
- JavaScript test scripts (
pm.testwith Chai) on every request, run from the command line with Newman in Docker.
Result
A 2026 re-run failed one test, and a review of the scripts found more:
| Problem | Effect |
|---|---|
| The GET used a variable that was never set | It fetched all bookings, so the test failed |
Create checked two fields that don't exist (one misspelt) with not.equal | undefined never equals anything, so they could never fail |
Update checked checkout instead of bookingdates.checkout | Also could never fail |
| The token was stored with quotes | Worked by luck |
After the fixes, every assertion checks a real field, and the live run on 2026-11-16 passed 8 of 8 assertions across 4 requests.
What this shows
API test design with chaining, and the habit of testing the tests: the original run was "all green", but three of its passes proved nothing.