Test a REST API from contract to failure

8 steps · about 4 h 35 min · Intermediate

  1. Read the API contract (reference, OpenAPI Initiative, 40 min)

    Extract operations, schemas, parameters, security requirements and documented error responses.

  2. Partition representative inputs (guide, Wikipedia, 30 min)

    Choose cases from meaningful valid and invalid classes rather than enumerating arbitrary examples.

  3. Probe boundaries (guide, Wikipedia, 30 min)

    Test limits where validation, paging, sizes and numeric ranges most often change behaviour.

  4. Verify HTTP semantics (reference, RFC Editor, 40 min)

    Check methods, status codes, representation metadata and conditional behaviour against the protocol.

  5. Test authentication boundaries (guide, OWASP, 40 min)

    Cover missing, expired and insufficient credentials without treating functional success as security evidence.

  6. Check repeat behaviour (guide, Wikipedia, 25 min)

    Verify which operations may be safely repeated and how duplicate requests affect stored state.

  7. Remove test order dependence (guide, Martin Fowler, 35 min)

    Isolate data and time so each test has an explicit starting state and repeatable result.

  8. Exercise dependency failures (guide, Wikipedia, 35 min)

    Simulate bounded timeouts and unavailable dependencies to verify stable error handling and recovery.