API testing

Validate enum and format rules

Hard120 pts~45 min
  • Enums
  • Formats
  • Regex
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-enum-and-format-rules

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

Objective

Assert enum values and string formats across the whole user list.

Your task

  1. 1GET BASE_URL + "/users?limit=100".
  2. 2For every user assert role is one of "admin", "editor", "viewer".
  3. 3Assert email matches an email pattern and createdAt is ISO-8601 (e.g. 2024-01-01T09:30:00.000Z).

Acceptance criteria

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