Blog

140+ Pagination Test Cases for Complete Coverage

Abhilash
Industry Analyst, Test Automation
Published on
August 20, 2026
In this Article:

A 141-case inventory of pagination test cases covering navigation, page size, URL state, sort and filter interaction, accessibility, and API behaviour.

Pagination is one of those UI patterns that looks trivial in the design review and falls over in production. A search results page that loads in 200ms breaks at page 47. A product grid that paginates perfectly in Chrome shifts layout in Safari. A sort that worked yesterday loses its position the moment a user navigates to page two and back. The component is ubiquitous, it carries customer-visible failure paths, and most teams underestimate the surface area it actually covers.

The inventory below is built for the QA engineers and SDETs who design and maintain pagination test cases for real applications. It runs to 141 cases by deliberate choice, organised the way pagination test design actually moves, namely from the navigation controls outward to URL state, sort and filter interaction, edge cases, accessibility, and the integrations that determine whether the component holds up at production scale.

Use it as a reference for new pagination components, as a regression baseline for established ones, and as a training inventory for testers learning what complete coverage looks like.

How to Use This Inventory

Each category opens with a short note on what it covers, and the test cases follow as numbered scenarios with a clear expected result. The cases are deliberately generic enough to apply to standard pagination across e-commerce listings, admin tables, search results, dashboards, and enterprise grids, so adjust the specifics, namely page sizes, default sort, and URL conventions, to the application under test.

The inventory assumes a typical numeric pagination control with First, Previous, page numbers, Next, and Last. Variants such as infinite scroll, load-more buttons, and cursor-based pagination are covered in their own sections.

Category 1 - Pagination Control Layout and Display

The first thing a user notices about pagination is whether the controls look like pagination, and layout cases catch the defects that pure functional testing misses.

  1. Pagination control renders at the bottom of the result list when results exceed page size.
  2. Pagination control is hidden when total results fit on a single page, where the design specifies hiding.
  3. Page number buttons display in a logical sequence (1, 2, 3, up to last).
  4. Current page is visually distinct from non-current pages, namely bold, highlighted, or a different background.
  5. Previous button is disabled on page 1.
  6. Next button is disabled on the last page.
  7. First and Last buttons, where present, jump to page 1 and the final page respectively.
  8. Ellipsis indicators appear when the page count exceeds the displayable window (1, 2, 3 ... 47, 48, 49).
  9. Page count display matches the actual number of pages.
  10. Items-per-page selector, where present, shows the current selection.
  11. Total items count displays correctly ("Showing 1 to 10 of 247 items").
  12. Pagination is responsive to viewport changes, hiding less-essential controls on narrower screens.
  13. Spacing and alignment of pagination controls are consistent with the broader design system.
  14. Focus states for keyboard navigation are clearly visible.
  15. Hover states apply consistently across all clickable pagination elements.

Category 2 - Numeric Page Navigation

Direct page selection is the most-used pagination interaction, and the cases below cover the working set.

  1. Click page 2: Selecting page 2 loads the correct subset of results and updates the current page indicator.
  2. Click page 5: Selecting any middle page loads the correct results.
  3. Click last page: Selecting the final page shows the remaining items, which may be fewer than the page size.
  4. Click current page: Re-selecting the current page does not trigger a redundant data fetch.
  5. Page numbers update: The visible window of page numbers shifts as the user navigates (1 to 5 visible on page 3, 3 to 7 visible on page 5).
  6. Direct jump field: Where a "Go to page" input is present, entering a valid number navigates to that page.
  7. Direct jump validation: Entering a non-numeric value, zero, or a number exceeding total pages is rejected with a clear error.
  8. Direct jump on Enter: Pressing Enter in the jump field triggers navigation.
  9. Page number truncation: With 100 pages, the control truncates intelligently (1, 2, 3 ... 50 ... 98, 99, 100 depending on design).

Category 3 - Previous and Next Navigation

Sequential navigation is what users default to when scanning multiple pages.

  1. Next from page 1: Clicking Next advances to page 2.
  2. Next from a middle page: Clicking Next advances by one page.
  3. Next on the last page: The Next button is disabled and clicking it has no effect.
  4. Previous from page 2: Clicking Previous returns to page 1.
  5. Previous on page 1: The Previous button is disabled and clicking it has no effect.
  6. Rapid clicking: Clicking Next multiple times in quick succession either queues correctly or debounces, and does not produce inconsistent state.
  7. Keyboard equivalents: Arrow keys or other documented shortcuts trigger Previous and Next where supported.
  8. Loading state on Next: A loading indicator appears during navigation if the data fetch takes more than the documented threshold.

Category 4 - First and Last Page Navigation

Jump-to-edge controls matter for large datasets where users need to reach the boundaries quickly.

  1. First button: Clicking First navigates to page 1 from any other page.
  2. First button on page 1: The First button is disabled and clicking it has no effect.
  3. Last button: Clicking Last navigates to the final page.
  4. Last button on the last page: The Last button is disabled.
  5. First after deep navigation: First works correctly from page 47 or any deep page.
  6. Last updates with data changes: If filters reduce total results, the last page number updates accordingly.

Category 5 - Page Size Selector

Changing the items-per-page count is one of the most common pagination interactions and one of the most defect-prone.

  1. Default page size: The default selection matches the documented default, commonly 10, 20, or 25.
  2. Page size options: Available options (10, 25, 50, 100) match the design.
  3. Change from 10 to 25: The first 25 items load on page 1.
  4. Change from 10 to 50: The total page count recalculates correctly.
  5. Change while on page 5: The user is repositioned per the spec, commonly a return to page 1 or staying on a page containing the previously visible items.
  6. Persistence within session: The user's selection persists across navigations within the session, where the spec requires it.
  7. Persistence across sessions: Where the application supports it, the selection persists for the logged-in user.
  8. Small dataset: Selecting 100 per page when only 23 results exist shows all 23 on page 1 with no second page.

Category 6 - Result Count Display

"Showing 1 to 10 of 247" sounds simple until the boundary cases hit.

  1. First page count: "Showing 1 to 10 of 247" displays correctly on page 1 with 10 per page.
  2. Middle page count: "Showing 21 to 30 of 247" displays correctly on page 3.
  3. Last page count: "Showing 241 to 247 of 247" displays correctly when the last page holds fewer than a full page.
  4. Single result: "Showing 1 to 1 of 1" displays correctly when only one result matches.
  5. Empty state: "Showing 0 results" or the specified empty-state message displays when filters return nothing.
  6. Large counts: Numbers display with thousand separators where appropriate (1,234,567).
  7. Localised count format: Number formatting respects the user's locale (1,234 vs 1.234).
  8. Count updates on filter: The total recalculates immediately when filters change.

Category 7 - URL, Deep Linking, and Crawlability

Modern pagination should let users bookmark and share specific pages, and for public lists it should let crawlers reach them too. State in the URL is what makes both work.

  1. Page in URL: Navigating to page 3 updates the URL with a page parameter (?page=3 or equivalent).
  2. Direct URL access: Loading a URL with ?page=5 takes the user directly to page 5.
  3. Page size in URL: Page size selection updates the URL where the design supports it (?pageSize=25).
  4. Sort in URL: Sort selection updates the URL parameters where the design supports it.
  5. Filter in URL: Active filters reflect in the URL so the state is bookmarkable, where the design supports it.
  6. Preserved on refresh: Refreshing the browser preserves the current page, page size, and filters.
  7. Invalid page parameter: A URL with ?page=abc is handled per the spec, commonly a redirect to page 1 or a graceful error.
  8. Out-of-range parameter: A URL with ?page=999 on a five-page dataset is handled per the spec, commonly a redirect to the last valid page or a clear message.
  9. Negative parameter: A URL with ?page=-1 is handled per the spec, commonly a redirect to page 1.
  10. Zero parameter: A URL with ?page=0 is handled per the spec, commonly a redirect to page 1.
  11. Crawlable pagination links: For public, indexable lists, pagination links are real anchor elements with href attributes pointing to unique page URLs, so crawlers can reach every page rather than being blocked by script-only navigation.
CTA Banner

Category 8 - Browser Back and Forward

Browser navigation is one of the most common pagination defect sources, since users hit back expecting to return to the previous page of results and the application sometimes forgets where they were.

  1. Back from page 2: Browser back returns to page 1 with the previous state intact.
  2. Forward to page 2: Browser forward returns to page 2 after a back.
  3. Back after a filter change: Going back undoes the filter change cleanly.
  4. Back from a detail page: Returning from a detail view lands the user on the same page they came from, not page 1.
  5. History entries: Each page navigation produces a single browser history entry, not duplicates.
  6. Scroll position on back: Returning to a paginated list restores the previous scroll position where the design specifies it.

Category 9 - Sort Interaction with Pagination

Sort changes the order of results, which changes what appears on each page, so the interaction needs its own cases.

  1. Sort on page 1: Applying a sort re-orders results and remains on page 1.
  2. Sort on page 5: Applying a sort repositions the user per the spec, commonly a return to page 1 since the position is no longer meaningful.
  3. Sort persistence: The sort selection persists as the user navigates between pages.
  4. Direction toggle: Clicking a sorted column reverses the direction from ascending to descending.
  5. Multi-column sort: Where supported, secondary sort keys apply correctly across pages.
  6. Stable ordering for tied values: When multiple records share the primary sort value, a deterministic secondary key keeps their order stable, so items do not move between pages across repeated requests.
  7. Sort at scale: Sorting 100,000 records returns the first page within the documented response time.
  8. Sort indicator: The active sort column shows a visual indicator, namely an arrow or highlight.

Category 10 - Filter Interaction with Pagination

Filters reduce the result set, and the pagination control needs to react accordingly.

  1. Filter from page 1: Applying a filter shows the new result set starting from page 1.
  2. Filter from page 5: Applying a filter repositions per the spec, commonly a reset to page 1.
  3. Filter reduces to one page: The pagination control behaves per the spec when filtered results fit on a single page, commonly hiding.
  4. Filter expands past one page: The control reappears when filters are cleared and results grow.
  5. Multiple filters: Combined filters apply correctly and the total count reflects the intersection.
  6. Filter reset: Clearing all filters returns the unfiltered result set and page 1.
  7. No matching results: A filter combination returning zero results shows the empty state cleanly, with pagination hidden per the spec.

Category 11 - Search Interaction with Pagination

Search behaves like a strict filter and follows similar rules with a few of its own.

  1. Search from any page: Submitting a new search returns results from page 1.
  2. Search refinement: Modifying the query while on a later page returns to page 1.
  3. Empty search: Submitting an empty search returns the default result set, or shows a validation error per spec.
  4. Search with no results: The empty result state displays cleanly and pagination is hidden per the spec.
  5. Search with one result: The single-result state displays without pagination, per the spec.

Category 12 - Boundary States

Pagination has to behave correctly at the edges, not just in the middle. The zero-result, single-page, and single-result states are covered in the count, filter, and search categories above, and the cases below cover the remaining boundaries.

  1. Exactly two pages: The control displays with First, Previous, 1, 2, Next, Last.
  2. First page partial: If page 1 contains fewer than a full page, unusual but possible with grouping, the count displays correctly.
  3. Last page partial: The last page with fewer than a full page displays the correct subset.
  4. Large dataset: With 10,000+ items, pagination performs within the documented threshold and the page count truncates intelligently.

Category 13 - Cross-Page Data Integrity

The defining production pagination defects live at the boundaries between pages, namely records that appear twice, records that vanish, and pages that shift under the user as the dataset changes. Most inventories never test them directly, and this category does.

  1. No duplicate records across pages: An item displayed on page N does not appear again on page N+1, unless duplication is expected by the business model.
  2. No missing records across a full traversal: Traversing every page of a stable dataset returns every record exactly once, with none skipped at the boundaries.
  3. Dataset changes during pagination: Inserts or deletes between page requests do not create unexpected duplicated or skipped records, with the exact behaviour matching the selected pagination strategy (offset or cursor).
  4. Current page becomes invalid: If records are removed while the user is on the last page and that page no longer exists, the UI recovers to a valid page rather than showing an error or an empty shell.
  5. Retry without duplication: Retrying a failed page request loads the intended page without duplicating results already rendered, in paged and load-more variants alike.

Category 14 - Infinite Scroll Variant

Many modern applications use infinite scroll instead of numbered pagination, and the cases below cover the variant.

  1. Initial load: The first batch of items loads on page entry.
  2. Scroll to bottom: Reaching the bottom triggers the next batch load.
  3. Loading indicator: A spinner or skeleton displays during the next-batch fetch.
  4. End of results: A clear "No more results" message displays when all data has loaded.
  5. Scroll back up: Earlier items remain rendered and the user can scroll back without re-fetching.
  6. Network failure mid-scroll: A failed batch shows an error and a retry option without losing already-loaded items.
  7. Back from detail: Returning from a detail view restores the scroll position and previously loaded batches.
  8. Memory handling: Very long scroll sessions virtualise off-screen items where appropriate.

Category 15 - Load More Button Variant

Load More is the explicit-action variant of infinite scroll.

  1. Button visible: The button appears below the current list when more results are available.
  2. Button click: Clicking the button appends the next batch.
  3. Button disabled: The button hides or disables when all results have loaded.
  4. Loading state: The button shows a loading indicator while the fetch is in progress.
  5. No more results: The button is replaced with a "No more results" message at the end.

Category 16 - Cursor-Based Pagination

Cursor-based pagination is common in modern APIs, and the UI must handle it cleanly.

  1. First page: The initial load uses no cursor and returns the first batch with a next-page cursor.
  2. Next page: Using the returned cursor fetches the next batch correctly.
  3. End of results: A null cursor signals the end and the UI handles it gracefully.
  4. Cursor invalidation: Sorting or filtering invalidates any cached cursor and restarts pagination from the beginning.
  5. Stale cursor: A cursor from an outdated query state is handled without crashing, typically by restarting pagination.

Category 17 - Backend and API Behaviour

Pagination is as much an API concern as a UI concern, and the cases below cover the backend layer.

  1. Correct offset and limit: API requests carry the correct offset and limit parameters per page.
  2. Correct cursor or page number: Cursor-based or page-based APIs receive valid parameters.
  3. Pagination metadata: Where the API contract includes it, the response returns an accurate total count or equivalent pagination metadata, noting that many cursor-based APIs deliberately omit totals.
  4. Page-size limit validation: Zero, negative, and above-maximum limit or pageSize values are handled per the API contract, namely rejected, clamped, or defaulted, and never produce an inconsistent response.
  5. Server-side sort: Sort parameters are honoured by the server, not just the client.
  6. Server-side filter: Filter parameters are honoured by the server.
  7. Empty result set: The API returns an empty array and the UI displays the empty state.
  8. API error handling: A 500 response from the pagination API shows a clear error with a retry option.
  9. Timeout handling: A slow response triggers the loading state and either resolves or times out gracefully.
  10. Concurrent requests: Rapid pagination clicks do not produce inconsistent UI state from out-of-order responses.

Category 18 - Accessibility

Pagination is an interactive control and needs full accessibility coverage.

  1. Keyboard navigation: Every pagination control is reachable and operable via keyboard.
  2. Tab order: Tab order moves through the controls in a logical sequence.
  3. Accessible names: Every control has an accessible name, from visible text or an ARIA label where text is absent, with aria-current="page" identifying the current page link.
  4. Page-change communication: Dynamic page changes are communicated to assistive technology through an appropriate mechanism per the design, namely a live region announcement or a deliberate focus strategy.
  5. Focus management: Focus moves to a sensible location after a page change, commonly the top of the result list.
  6. Disabled states announced: Disabled Previous and Next buttons are conveyed as disabled to assistive technology.
  7. Contrast on active states: Active, hover, focus, and current-page states meet the applicable contrast requirements, noting that inactive or disabled controls are exempt from the non-text contrast requirement under WCAG.
  8. Target size: Pagination links and buttons meet the WCAG 2.2 minimum target size of 24 by 24 CSS pixels, or qualify under the spacing exception, since page-number links are classically small tap targets.

Category 19 - Cross-Browser and Cross-Device

Coverage spans the browsers and viewports the business commits to supporting.

  1. Supported browser matrix: Pagination behaves correctly across the browsers and versions defined in the supported browser matrix, typically covering Chrome, Edge, Firefox, and Safari.
  2. Responsive layout: Pagination adapts cleanly at the supported application breakpoints and representative mobile, tablet, and desktop viewports.
  3. Touch interaction: Controls are usable with touch on tablet and mobile viewports, where clickable areas and scroll behaviour differ from desktop.

Category 20 - Localisation

Multilingual applications need pagination that adapts to the user's language.

  1. Translated labels: Previous, Next, First, Last, and "Showing X to Y of Z" labels translate correctly.
  2. RTL layouts: Right-to-left languages display pagination mirrored, with Previous and Next on the appropriate sides.

What a Suite This Size Costs to Maintain

A working pagination suite of test cases is a significant asset and a real maintenance commitment, and it breaks for the same reasons most enterprise UI automation breaks. Library upgrades change the DOM structure, design system refreshes alter the page-number rendering, new page size options appear, and the integration between sort, filter, and pagination gets re-architected once a year. A suite maintained against brittle selectors becomes a maintenance backlog inside two release cycles.

The unit economics shift when the test architecture absorbs application change instead of breaking on it.

Virtuoso QA authors pagination tests in plain English, namely "navigate to page 5, verify the correct rows show," rather than coupling them to CSS classes, so a design refresh does not invalidate the suite.

Self-healing absorbs the routine DOM updates that break locator-based automation, with proposed repairs running at approximately 95% user acceptance under human oversight, and GENerator can produce a draft suite from the application screens, which turns the initial 141-case build from weeks of authoring into review and refinement. UI assertions and the API checks in Category 17 sit in the same test, so the backend layer, including the cross-page integrity traversals in Category 13, is covered without a second tool.

CTA Banner

Related Reads

Frequently Asked Questions

How Many Test Cases Should a Pagination Component Have
A comprehensive pagination suite typically runs to 100 or more cases once navigation controls, page size, URL state, sort and filter interaction, cross-page data integrity, accessibility, cross-browser coverage, and edge cases are all included. The 141-case inventory above represents what mature programmes test against for enterprise-grade pagination. Simpler internal applications may need fewer, while enterprise data grids and e-commerce listings often need more.
How Do You Test Pagination Data Integrity Across Pages
Traverse every page of a stable dataset and confirm each record appears exactly once, with no duplicates at page boundaries and none skipped. Then test under change, namely inserts and deletes between requests, tied sort values without a deterministic secondary key, a current page invalidated by deletions, and a retried request that must not duplicate rendered results. These are the classic production pagination defects, and they need explicit cases.
How Do You Test Pagination with Sorting and Filtering
Applying a sort or filter typically repositions the user per the spec, commonly to page 1 because the previous position is no longer meaningful. The sort or filter state should persist across page navigation, tied sort values need a deterministic secondary key so items do not move between pages, and clearing filters should restore the unfiltered set.
How Do You Test Infinite Scroll Pagination
Cover initial load, scroll-triggered batch loading, the loading indicator, the end-of-results state, scroll position preservation when returning from detail views, network failure handling without losing loaded items, and memory handling for very long sessions.
What is Cursor-Based vs Offset-Based Pagination
Offset-based pagination uses a page number and a limit, so page 3 with a limit of 10 returns records 21 to 30. Cursor-based pagination uses an opaque token returned by the server that points to the next batch, which is more efficient for large datasets, more resilient to dataset changes mid-pagination, and preferred by modern APIs. The two need different test cases because the failure modes differ, and cursor APIs often omit total counts by design.

How Do You Automate Pagination Test Cases

Modern automation covers the journey end to end, authored in plain English, surviving routine UI change through self-healing, and combining UI assertions with API verification in a single test, which is what makes the cross-page traversal cases practical to run. Generation from application screens or requirements accelerates the initial build, and the maintenance cost of the suite is what determines whether the automation lasts.

Subscribe to our Newsletter

Codeless Test Automation

Try Virtuoso QA in Action

See how Virtuoso QA transforms plain English into fully executable tests within seconds.

Try Interactive Demo
Schedule a Demo