API testing

Chain a value into the next request

Medium70 pts~25 min
  • Chaining
  • Data extraction
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/qa-automation-chain-a-value-into-the-next-request

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

Objective

Extract a value from one response and use it to drive the next request.

Your task

  1. 1GET BASE_URL + "/orders?status=paid" and take items[0].customerId.
  2. 2GET BASE_URL + "/users/{customerId}" and assert 200.
  3. 3Assert the user id equals the customerId you extracted.

Acceptance criteria

  • GET /orders returns 200
  • GET /users/{id} returns 200
  • At least 2 assertions pass

Fixtures

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

API testing · QA Automation · Working with JSON