API testing

Inspect a JSON response body

Easy30 pts~12 min
  • JSON parsing
  • Body assertions
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-inspect-a-json-response-body

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

Objective

Parse the JSON body of GET /users/1 and assert the seeded values of Ada Lovelace.

Your task

  1. 1GET BASE_URL + "/users/1" and assert 200.
  2. 2Assert id === 1, name === "Ada Lovelace", email === "ada@acme.test".
  3. 3Assert role === "admin".

Acceptance criteria

  • GET /users/1 returns 200
  • At least 4 assertions pass on the body

Fixtures

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

API testing · SDET · HTTP fundamentals