All learning modules
API Testing Beyond Status Codes
An API contract is behaviour, data and state.
Good API testing checks far more than endpoint availability. Work through contracts, boundaries, compatibility and state transitions using realistic failure modes.
Learn by making an engineering decision, then inspect the reasoning.
Layer 1
Transport
Layer 2
Schema
Layer 3
Business rules
Layer 4
State & side effects
1
HTTP 200, but is the API correct?
POST /orders returns 200 with an order object. The total is wrong because a discount was applied twice.
2
Test the negative contract
An endpoint requires quantity > 0, but all automated tests use valid positive values.
3
Consumer compatibility
A service team renames response field customerId to id. Their unit tests still pass.
4
State transition matters
PATCH /orders/123/cancel returns a valid cancelled response, but the inventory reservation is never released.
Current score
0 / 4