Skip to main content

How would you test API pagination?

  • pagination
  • edge cases
  • data integrity

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

Model answer

Test: (1) First page returns correct page size. (2) Navigating all pages returns all records without duplicates. (3) Empty page when offset exceeds total. (4) Page size parameter works correctly. (5) Sorting is consistent across pages. (6) Total count header/field is accurate. (7) Edge cases: page=0, page=-1, pageSize=0, very large pageSize. For cursor-based pagination, verify cursor stability when data changes between requests.

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.

Terms to know

See all 35 api testing questions

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