The API said 201 Created… sweet! But after checking, something felt off. not everything created is usable.
Type of testing: Endpoint Testing
Status: Code 201
Step to Reproduce (Mock Server):
- Create a Mock Server in Postman.
- Add endpoint: POST /orders.
- Define 5 responses, all with status 201 Created:
- ✅ Success → id: 101
- ❌ Fail → id: null
- ❌ Fail → id: “” (invalid)
- ❌ Fail → missing id
- ⚠️ Edge Case → duplicate id: 101
- Send the request → observe how the body changes but status stays 201 Created.
✅ Success → id: 101

❌ Fail → id: null

❌ Fail → id: “” (invalid)

❌ Fail → missing id

⚠️ Edge Case → duplicate id: 101

What This Shows:
- Status code ≠ correct behaviour
- Need to validate response integrity
- Demonstrates testing beyond happy path
Pro Tips:
- Follow with
GET /orders/{id} - ❌ Resource does not exist or fails
- Detects data persistence issues
- Useful for validating backend consistency
Lesson:
“a ‘Created’ response is meaningless if the resource can’t be used”.