Drive tests from an external file
Medium70 pts~25 min
- External test data
- Data-driven testing
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
Load test cases from a JSON/CSV document and run one request per case.
Your task
- 1Embed the file content as a string: [{"id":1,"email":"ada@acme.test"},{"id":4,"email":"katherine@acme.test"},{"id":9999,"status":404}].
- 2Parse it at runtime (JSON parser or CSV split) — do not hand-write the loop data.
- 3For each case GET BASE_URL + "/users/{id}" and assert the expected email or status.
Acceptance criteria
- GET /users/{id} returns 200 and 404 for the cases
- The data is parsed and iterated
- At least 3 assertions pass
Constraints
- File I/O is unavailable in the runner: embed the file content as a string and parse it.
Fixtures
- apiKey
- tqa_live_key_123
- basicUser
- admin
- basicPassword
- secret
- username
- qa@target.dev
- password
- Test@123
API testing · API Testing · Data-driven & parameterization