Assert a not-found (404) response
Easy30 pts~12 min
- 404 Not Found
- Error envelope
Practice app · Acme REST API
A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Assert a clean 404 for a user that does not exist.
Your task
- 1GET BASE_URL + "/users/9999".
- 2Assert 404 and error.code === "USER_NOT_FOUND".
- 3Assert error.message is a non-empty string.
Acceptance criteria
- GET /users/{id} returns 404
- At least 2 assertions pass
Fixtures
- apiKey
- tqa_live_key_123
- basicUser
- admin
- basicPassword
- secret
- username
- qa@target.dev
- password
- Test@123
API testing · API Testing · Authorization & negative testing