API testing

Validate against a JSON schema

Medium70 pts~25 min
  • JSON Schema
  • Contract testing
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-validate-against-a-json-schema

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

Objective

Validate GET /users/1 against a JSON Schema that encodes the documented User shape.

Your task

  1. 1Write a JSON Schema: required id, name, email, role, active, createdAt, address, tags with their types.
  2. 2GET BASE_URL + "/users/1".
  3. 3Validate the body with your stack's schema validator and assert it passes.

Acceptance criteria

  • GET /users/1 returns 200
  • A schema validator is used
  • At least 1 assertion passes

Fixtures

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

API testing · SDET · Schema & contracts