Skip to main content

Explain how you would test API pagination thoroughly.

  • pagination
  • data integrity
  • edge cases

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

Model answer

Test cases: (1) First page returns correct count and has next link. (2) Last page has no next link. (3) Empty collection returns empty array. (4) Page size parameter is respected. (5) Cursor/offset consistency when data changes between pages. (6) Invalid page numbers return appropriate errors. (7) Large page sizes are capped. (8) Total count accuracy. (9) Sorting is consistent across pages, no duplicate or missing items. (10) Performance with large datasets. Both offset-based and cursor-based pagination have different edge cases to cover.

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