QA interview guide

How would you test filters and sorting?

Filters and sorting become complicated when they combine with pagination, search, saved views, URL state, backend parameters, permissions, and changing data. A strong answer protects result correctness and user trust.

Write your own answer and compare it with senior QA coverage.

What interviewers expect

What interviewers expect

Interviewers expect single and multiple filters, AND/OR logic, sort direction, stable sorting, pagination interaction, reset behavior, URL query params, saved filters, invalid filters, backend consistency, permissions, accessibility, mobile behavior, and performance.

Checklist

Checklist

Use these practical prompts to build a complete answer. Strong interview responses usually include functional behavior, negative cases, security, backend/data risks, UX, accessibility, and reliability.

Filter behavior and combinations

  • Single filter, multiple filters, clear one filter, clear all filters, and default filter state work.
  • Selected filters remain visible through chips, dropdowns, checkboxes, or applied state.
  • Filters combine with AND or OR logic according to requirements.
  • Search with filters, filters with sorting, filters with pagination, and unsupported combinations behave safely.
  • Result count updates correctly when filters are applied, removed, reset, or saved.

Sorting, pagination, and URL state

  • Sort by each supported field with ascending, descending, and default order.
  • Sort direction indicator, selected sort, stable sorting, and same-value ordering are correct.
  • Numeric, date, string, locale, case, null, and missing-value sorting are handled consistently.
  • Pagination works with filters and sorting without duplicate or missing items.
  • URL query params, browser refresh, back/forward, bookmarked links, and saved filters preserve state if supported.

Negative, backend, and permissions

  • No results, empty state, invalid filter, invalid sort field, invalid sort direction, empty values, long values, special characters, and Unicode are handled.
  • Correct filter parameters, sort parameters, API status codes, response schema, backend validation errors, timeout, and network failure are verified.
  • Results match active filters, result count matches active filters, and stale cached data is not shown.
  • Updated records, deleted records, business rules, permissions, tenant isolation, and restricted data visibility are respected.
  • XSS, SQL/query injection, and parameter tampering are blocked.

UX, accessibility, mobile, and performance

  • Loading, empty, error, clear-selected-filter, reset, and saved-filter states are clear.
  • Keyboard navigation, labels, focus states, and screen reader result-count announcements work.
  • Filters and sorting are usable on mobile with no horizontal scroll and good touch targets.
  • Large datasets, many filter combinations, rapid filter changes, debounce, and apply-button behavior are reliable.
  • Response time, cache behavior, metrics, and analytics events are checked where applicable.

Complete interview coverage checklist

Aim to mention 20-40 concrete checks. This expanded list helps you turn a short answer into a structured senior-style response.

Single filter, multiple filters, clear one filter, clear all filters, and default filter state work.
Selected filters remain visible through chips, dropdowns, checkboxes, or applied state.
Filters combine with AND or OR logic according to requirements.
Search with filters, filters with sorting, filters with pagination, and unsupported combinations behave safely.
Result count updates correctly when filters are applied, removed, reset, or saved.
Sort by each supported field with ascending, descending, and default order.
Sort direction indicator, selected sort, stable sorting, and same-value ordering are correct.
Numeric, date, string, locale, case, null, and missing-value sorting are handled consistently.
Pagination works with filters and sorting without duplicate or missing items.
URL query params, browser refresh, back/forward, bookmarked links, and saved filters preserve state if supported.
No results, empty state, invalid filter, invalid sort field, invalid sort direction, empty values, long values, special characters, and Unicode are handled.
Correct filter parameters, sort parameters, API status codes, response schema, backend validation errors, timeout, and network failure are verified.
Results match active filters, result count matches active filters, and stale cached data is not shown.
Updated records, deleted records, business rules, permissions, tenant isolation, and restricted data visibility are respected.
XSS, SQL/query injection, and parameter tampering are blocked.
Loading, empty, error, clear-selected-filter, reset, and saved-filter states are clear.
Keyboard navigation, labels, focus states, and screen reader result-count announcements work.
Filters and sorting are usable on mobile with no horizontal scroll and good touch targets.
Large datasets, many filter combinations, rapid filter changes, debounce, and apply-button behavior are reliable.
Response time, cache behavior, metrics, and analytics events are checked where applicable.
Structure your answer: Start with single filter, multiple filters, clear/reset behavior, and visible applied state.
Structure your answer: Add sorting and pagination: supported fields, asc/desc, stable sorting, result counts, and no duplicate pages.
Structure your answer: Add URL and backend behavior: query params, refresh, saved filters, invalid values, API parameters, and permissions.
Structure your answer: Close with empty states, accessibility, mobile layout, large datasets, performance, and stale data.
Do not miss: Pagination combined with active filters and sorting.
Do not miss: URL state, back button, bookmarks, and saved filters.
Do not miss: Stable sorting for equal values and null values.
Do not miss: Permission leaks through filters, sorting, or result counts.

Ready to practice?

Practice this scenario interactively

Write your own answer and compare it with senior QA coverage.

Practice this scenario

Answer structure

Strong answer structure

  1. Start with single filter, multiple filters, clear/reset behavior, and visible applied state.
  2. Add sorting and pagination: supported fields, asc/desc, stable sorting, result counts, and no duplicate pages.
  3. Add URL and backend behavior: query params, refresh, saved filters, invalid values, API parameters, and permissions.
  4. Close with empty states, accessibility, mobile layout, large datasets, performance, and stale data.

Common missed areas

Common missed risks

Pagination combined with active filters and sorting.
URL state, back button, bookmarks, and saved filters.
Stable sorting for equal values and null values.
Permission leaks through filters, sorting, or result counts.

Answer template

Use this interview answer template

I would start with single and multiple filters plus sort order, then cover pagination interaction, empty states, reset behavior, URL/query params, saved filters, invalid filters, backend consistency, permissions, accessibility, mobile behavior, stale data, and performance.

Use it as a structure, then replace the examples with specific checks for the feature you are discussing.

Common weak answer

“I would test valid and invalid cases.”

This is too generic because it does not show risk thinking. A stronger answer names the happy path, negative cases, security risks, backend/data behavior, UX/accessibility, and reliability concerns that matter for this exact scenario.

Examples

Weak answer vs stronger answer

Weak answer
I would test one filter and ascending sort.

This is relevant but shallow. It misses combinations, reset behavior, pagination, URL state, invalid filters, backend validation, permissions, accessibility, mobile, and performance.

Stronger answer
I would test single filter, multiple filters, clear one filter, clear all filters, reset filters, default state, selected filter chips, AND/OR logic, search with filters, filters with sorting and pagination, sort by each supported field, ascending and descending sort, default order, stable sorting, numeric/date/string/null sorting, pagination with no duplicates, URL query params, browser refresh, back button, saved filters, no results, invalid filter, invalid sort field, special characters, Unicode, API parameters, backend errors, timeout, stale cache, unauthorized data hidden, XSS and SQL injection blocked, loading state, keyboard navigation, screen reader result count, mobile layout, large datasets, debounce, and performance.

FAQ

Frequently asked questions

What should I mention first when answering "How would you test filters and sorting?"

Start with single filter, multiple filters, clear/reset behavior, and visible applied state.

Should I include negative and edge cases?

No results, empty state, invalid filter, invalid sort field, invalid sort direction, empty values, long values, special characters, and Unicode are handled. Correct filter parameters, sort parameters, API status codes, response schema, backend validation errors, timeout, and network failure are verified.

Should I include security, API, or backend risks?

No results, empty state, invalid filter, invalid sort field, invalid sort direction, empty values, long values, special characters, and Unicode are handled. Correct filter parameters, sort parameters, API status codes, response schema, backend validation errors, timeout, and network failure are verified.

What are common missed risks?

Pagination combined with active filters and sorting. URL state, back button, bookmarks, and saved filters. Stable sorting for equal values and null values. Permission leaks through filters, sorting, or result counts.

How can I practice this answer?

Use the interactive how would you test filters and sorting? challenge to write your own answer, get checklist-based feedback, and compare your coverage with stronger QA thinking.

Practice

Practice this scenario interactively

Write your own answer and compare it with senior QA coverage.

Practice this scenario