API testing

Test equivalence partitions

Hard120 pts~45 min
  • Equivalence partitioning
  • Test design
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-test-equivalence-partitions

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

Objective

Cover the email input of POST /users with one representative per equivalence class.

Your task

  1. 1Define partitions: valid new email → 201, malformed email → 400, already registered (ada@acme.test) → 409.
  2. 2POST BASE_URL + "/users" with { "name": "Partition Test", "email": <value> } for each partition.
  3. 3Assert the status and error.code (VALIDATION_ERROR / EMAIL_TAKEN) per partition.

Acceptance criteria

  • POST /users returns 201, 400 and 409
  • The partitions are data-driven
  • 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 · Data-driven & parameterization