Q11 of 22 · Scenarios
How would you test pagination on a results list?
ScenariosMidscenariopaginationfunctionalperformanceboundary-testing
Short answer
Short answer: Clarify whether pagination is server-side or client-side, cursor-based or offset, and whether URLs are shareable. Then cover boundary pages, dataset-boundary edge cases, concurrent modification, and performance on large offsets.
Detail
Clarify first
- Is pagination server-side (each page triggers a new request) or client-side (all data loaded once, sliced in the browser)?
- Is it offset-based (page=2&size=10) or cursor-based (after=cursor_token)?
- Are paginated URLs shareable (deep-linkable to page N)?
- What is the default and configurable page size?
Functional
- Page 1 shows the correct first N results
- Next and previous navigation advances and retreats by exactly one page
- The last page shows the remaining items and does not show an empty extra page
- Total result count and current page indicator are accurate
- Directly navigating to /results?page=3 renders the correct results
Negative / error handling
- Requesting a page beyond the total (page 999 of a 5-page set) → empty results or redirect to last page, not a server error
- Page size of 0 or a negative value → handled gracefully (default applied or error returned)
- Invalid or non-numeric page parameter → error or fallback to page 1
Edge & boundary
- Exactly page-size items total → only one page, no Next button shown
- Exactly page-size + 1 items → second page with exactly 1 item; Prev button shown, Next hidden
- Item deleted by another user while browsing page 2 → item count changes; pagination recalculates correctly (no ghost pages, no skipped items on refresh)
- New item added at the top while browsing page 2 → item on old page 1 shifts to page 2 (offset-based pagination known limitation — is this the expected behavior?)
Performance
- Page 1 load time vs page 50 load time (offset queries degrade at high offset values on large tables — is there an index on the sort column?)
- Load time with a large total result set and many pages
Usability
- Keyboard navigation through page controls; current page clearly indicated; ARIA label on navigation element
Close: automate functional navigation, boundary pages (first, last, beyond-last), and direct URL access. Keep manual for the concurrent-modification UX — does the UI communicate that results shifted?
// WHAT INTERVIEWERS LOOK FOR
The offset-query performance degradation at high page numbers, and the data-shifting problem when items are added/removed during browsing. These are real pagination pitfalls beyond basic navigation testing.
// COMMON PITFALL
Only testing next/prev navigation and the empty state. Missing the boundary pages (exactly page-size and page-size+1 items), deep-link support, and performance on large datasets.