Skip to content
QA Knowledge Hub

Test cases for pagination

Updated 2026-11-13 · 6 min read

These 30 cases use explicit test fixtures and checkable outcomes. Cover normal behavior, boundaries, recovery, security and usability, then adapt the requirements to your product.

How to answer in an interview

Ask whether the list uses numbered pages, offsets or cursors, whether totals are exact, and what happens when records change. Then explain traversal, boundaries and recovery before discussing visual controls. A good first example is proving that every seeded record appears exactly once across a stable list.

Scope and test data

These 30 cases assume numbered pages, a default size of 10, selectable sizes of 10 and 25, and 23 fake records named Item 01 through Item 23. Sort by a fixed unique ID ascending. The example contract resets to page 1 after filtering or changing size, and clamps an out-of-range page to the last available page. Invalid syntax is rejected. These are chosen requirements, not rules that every API follows.

Use a frozen dataset for duplicate/missing-record assertions. Test concurrent inserts separately: offset pagination can shift records when the underlying list changes, so a snapshot or cursor contract needs its own expected sequence.

These are proposed manual test cases, not an execution report. Run security and load checks only in an authorised isolated environment. Record agreed limits before execution; a case without its required limit is not ready to pass or fail.

Traversal and boundaries

IDCategoryTest caseExpected result
P01FunctionalOpen the initial listItems 01–10 appear; current page is 1 and total is 23
P02FunctionalChoose Next onceItems 11–20 appear; current page becomes 2
P03FunctionalChoose Previous from page 2Items 01–10 return in their original order
P04FunctionalChoose page 3 directlyOnly Items 21–23 appear; range reads 21–23 of 23
P05BoundaryInspect Previous on page 1 and Next on page 3Unavailable actions cannot request page 0 or page 4
P06FunctionalTraverse all pages and collect IDsExactly 23 distinct IDs appear, with none missing
P07BoundaryRepeat with an empty datasetEmpty state appears with no active Next or Previous action
P08BoundaryRepeat with one recordOne record appears on page 1 with no next page
P09BoundaryRepeat with exactly 10 recordsOne full page appears; no phantom empty page follows
P10BoundaryRepeat with 11 recordsPage 2 contains exactly the eleventh record

State, invalid requests and recovery

IDCategoryTest caseExpected result
P11FunctionalSwitch page size to 25 while on page 2Page resets to 1 and all 23 records appear
P12FunctionalApply a filter matching three records from page 3Page resets to 1 and count is 3
P13FunctionalChange sort while on a later pagePage resets to 1; the requested ordering covers the whole dataset
P14FunctionalRefresh a valid page-2 URLPage 2 and the selected size, sort and filters are restored
P15FunctionalOpen a detail view from page 2 and use BackPage 2 returns with the same filters and selected size
P16NegativeRequest page 0, a negative page or a fractional pageValidation identifies the invalid page; no arbitrary offset is queried
P17NegativeRequest a nonnumeric page or unsupported sizeRequest is rejected with a controlled validation response
P18BoundaryRequest page 99 with the 23-record fixturePage 3 is shown and the URL and current-page indicator agree
P19FunctionalDelete all three records on page 3, then reloadList moves to page 2 and reports 20 records
P20NegativeFail the page-2 request, then retryFailure is visible; retry loads page 2 without duplicating rows

Race conditions, accessibility and operational checks

IDCategoryTest caseExpected result
P21FunctionalDelay page 2, request page 3, then release page 2Page 3 remains selected; the stale response cannot replace its rows
P22FunctionalClick Next repeatedly while loadingFinal selected page matches its rows; no mixed-page append occurs
P23SecurityRequest another tenant's records through a modified list URLNo IDs, counts or rows from the other tenant are returned
P24SecurityInsert markup-like text in a page parameterValidation renders it safely; no script runs
P25UITraverse controls with keyboard onlyFocus is visible; available pages activate without a mouse
P26UIInspect current-page and navigation names with a screen readerCurrent page and each navigation destination can be distinguished
P27UILoad a new page with a screen reader activeCompletion or result-count status is announced without stealing focus
P28CompatibilityRun traversal on supported desktop and mobile browsersThe same 23 IDs and boundaries are obtained on each
P29PerformanceMeasure first and deep pages on a large seeded datasetBoth meet the recorded latency budget; measurements include page number and dataset size
P30UIUse a narrow viewport with many page numbersControls remain reachable; condensed page ranges do not obscure current or last page

Evidence and interview follow-up

Save the IDs returned by each request, its page parameters and the displayed range. A screenshot alone cannot prove that page 2 has not repeated page 1. Do not equate a fast first page with a fast deep page; measure both against an agreed budget.

If asked “What if a record arrives while I browse?”, explain that the expected result depends on snapshot versus live-list semantics. Agree on that before logging duplicates caused by live inserts as defects.

Downloads

Quick answers

Does every paginated list need a total count?

No. Cursor-based lists may offer only a next-page token. Replace exact-count assertions with continuation and end-of-list checks.

Which pagination cases should be smoke tests?

Initial page, next and previous, last partial page, empty results, and filter reset catch different failure modes quickly.

Sources

Want a project you can show in interviews?

The portfolio project kit walks you through testing a deliberately buggy app with Selenium or Playwright and API tests, then explaining it. The app itself is free.