API testing

Detect a breaking contract change

Hard120 pts~45 min
  • Consumer-driven contracts
  • Backward compatibility
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-detect-a-breaking-contract-change

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

Objective

Write a consumer contract checker that passes on the live API and flags a simulated breaking change.

Your task

  1. 1Define the consumer's expectations: field name → type for id, name, email, role, active.
  2. 2GET BASE_URL + "/users/1" and assert your checker reports no violations.
  3. 3Copy the body, remove email and turn id into a string, run the checker again.
  4. 4Assert it reports both violations (missing field + type change).

Acceptance criteria

  • GET /users/1 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 · SDET · Schema & contracts