Skip to main content

How do you test API versioning?

  • API versioning
  • backward compatibility
  • migration

Answer it first, then compare. Nothing here is saved or scored.

Model answer

Verify: (1) Both versions (v1, v2) work simultaneously during migration. (2) v1 responses match documented v1 schema (no v2 leakage). (3) Deprecation headers are present on old versions. (4) Backward compatibility, clients using v1 aren't broken. (5) Version negotiation (via URL path, header, or query param) routes correctly. Test the full lifecycle: create in v1, read in v2, and vice versa if supported.

What interviewers listen for

  • Schema-first thinking
    You validate response shape before you assert on values, every time.
  • Status-code literacy
    You can defend why 401 vs 403 vs 422 matters for the consumer.
  • Contract awareness
    You know when consumer-driven contract tests beat end-to-end checks.
  • Auth fluency
    You can describe rotating tokens across parallel workers without secrets in logs.

See all 35 api testing questions

Written by , Senior QA Automation Engineer, 50+ QA candidate interviews conductedLast updated July 2026