API testing

Assert the response time

Medium70 pts~25 min
  • Latency budgets
  • Timing
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-assert-the-response-time

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

Objective

Measure client-side response time and assert it against a budget, including a deliberately slow endpoint.

Your task

  1. 1Time GET BASE_URL + "/users/1" and assert it completes in under 2000 ms.
  2. 2Time GET BASE_URL + "/slow?delay=500" and assert it takes at least 500 ms.
  3. 3Assert the slow body is { delayedMs: 500 }.

Acceptance criteria

  • GET /users/1 returns 200
  • GET /slow returns 200
  • 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 · HTTP fundamentals