API testing

Run a test across a data table

Medium70 pts~25 min
  • Data-driven testing
  • Parameterisation
Practice app · Acme REST API

A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.

BASE_URL
/api/practice
Console app
/lab/api-testing-run-a-test-across-a-data-table

Your starter code already declares BASE_URL — call the API relative to it.

Objective

Drive one test from a table of ids and expected names.

Your task

  1. 1Define rows (1, "Ada Lovelace"), (2, "Alan Turing"), (3, "Grace Hopper").
  2. 2For each row GET BASE_URL + "/users/{id}" and assert 200 and the expected name.
  3. 3Use your framework's parameterisation so each row reports separately.

Acceptance criteria

  • GET /users/{id} returns 200
  • The test is data-driven
  • At least 3 assertions pass

Fixtures

apiKey
tqa_live_key_123
basicUser
admin
basicPassword
secret
username
qa@target.dev
password
Test@123

API testing · API Testing · Data-driven & parameterization