API testing

Read and assert a response header

Easy30 pts~12 min
  • Response headers
  • Observability
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/sdet-read-and-assert-a-response-header

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

Objective

Read response headers from GET /users/1 and assert the tracing headers the API always sends.

Your task

  1. 1Send GET BASE_URL + "/users/1" and assert 200.
  2. 2Read the X-Request-Id header and assert it is present and non-empty.
  3. 3Read X-Response-Time and assert it ends with “ms”.

Acceptance criteria

  • GET /users/1 returns 200
  • At least 3 assertions pass (status, X-Request-Id, X-Response-Time)

Fixtures

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

API testing · SDET · HTTP fundamentals