SeleniumLab

Course3 · Professional QA engineering → API & Contract Testing

3 · Professional QA engineering

Contract and schema testing

18 min · Module 17

A contract is the agreement between provider and consumer (fields, types, required keys, error format). Breaking changes need versioning.

Assert JSON keys/types for HelpDesk tickets: id, subject, priority, status.

Example / notes

# Expected ticket contract (simplified)
# {"id": int, "subject": str, "description": str, "priority": "low|medium|high", "status": str}
required = {"id", "subject", "priority", "status"}

Practice in Lab: /lab/api/tickets/

Log in to track progress / take quizzes
← HTTP API testing fundamentals
Modules in this track