How to Test Search Functionality in Mobile and Web Apps
Search is where users go when they cannot find what they want through navigation. A broken search means a lost conversion or a failed task. Testing it well covers relevance, responsiveness, edge cases
Search is where users go when they cannot find what they want through navigation. A broken search means a lost conversion or a failed task. Testing it well covers relevance, responsiveness, edge cases, and accessibility. This guide is the checklist.
What to test
Query input
- Search-as-you-type with debounce (300-500ms)
- Clear button present, functional
- Voice input option (if supported)
- Paste works
- Autocorrect / autocapitalize appropriate for search (usually off)
- Submit on enter (keyboard return)
- Keyboard dismisses on scroll or tap elsewhere
Results
- Relevant results appear within 2 seconds
- Result count visible ("42 results" or similar)
- Infinite scroll / pagination for long lists
- Empty state helpful — suggestions, not a blank screen
- "Did you mean" for typos
- Exact match ranked above partial matches
Filters and sort
- Filter UI visible and functional
- Filter state visible in query bar / chips
- Filter reset clears all selections
- Sort order (relevance, date, popularity) respected
Autocomplete / suggestions
- Recent searches suggested on empty input
- Suggestions update as user types
- Trending / popular suggestions where appropriate
- Suggestion tap populates input and executes search
- Suggestion keyboard-navigable
Edge cases
- Empty query → appropriate default state
- Single character → too short message or start suggestions
- Very long query (500+ chars) → handled or truncated cleanly
- Special characters (!, @, #, emoji, unicode) → either handled or sanitized
- SQL injection patterns → sanitized, not executed
- Foreign language (RTL, CJK) → correct rendering and search
- Rapid query changes → debounce prevents stale results
- Results filter by permission (user sees only what they should)
Accessibility
- Search input labeled ("Search products")
- Result count announced to screen reader
- Results keyboard-navigable
- Voice search accessible via hands-free
- Large touch targets on result rows
Performance
- First result within 2 seconds on 4G
- No jank during typing
- Background search when tab not visible paused
- Cache recent queries for offline
Manual testing
Test specific scenarios:
- Typo tolerance: "iphone" vs "iphoen"
- Partial match: "nike" should surface "Nike Air Max"
- Plurals and tenses: "run" vs "running" vs "runs"
- Case sensitivity: mostly should be case-insensitive
- Stopwords: "the best running shoes" should work even with "the"
Automated
Unit / integration
Test the search backend with known query → expected ranking.
Assert empty state, correct pagination, filter combinations.
UI (Playwright / Appium)
def test_search(page):
page.goto("/search")
page.fill('[data-test="search"]', "phone")
# Wait for debounced results
page.wait_for_selector('[data-test="result-row"]')
assert len(page.query_selector_all('[data-test="result-row"]')) > 0
How SUSA tests search
SUSA's flow detector identifies search screens (SearchView detection, input + results pattern). Exploration drives:
- Simple queries (single word, short phrase)
- Edge queries (empty, special chars) via adversarial persona
- No-result queries — does the app show a useful empty state?
- Filter / sort interactions — do they change results predictably?
Performance monitor captures result latency. Accessibility check flags missing labels on results.
susatest-agent test myapp.apk --persona curious --steps 100
Common production bugs
- Stale results from previous query — debounce not properly canceling old requests
- Empty state is a blank page — users confused, leave
- Results not ranked by relevance — alphabetical or date-based where relevance expected
- Voice input types but does not submit — UX dead-end
- Suggestions include deleted / unavailable items — outdated index
Search is a silent conversion killer. Automate the relevance tests, manual-check the UX, run SUSA on every release to catch the weird ones.
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free