Test cases for dropdown and multi-select
Updated 2026-11-13 · 6 min read
Thirty cases for single-select and multi-select controls with stable option IDs. Tests filtered selections, select-all boundaries, stale responses and accessible interaction.
How to answer in an interview
Ask whether the control is a native select, a searchable combobox or a multi-select listbox. Clarify required values, selection limits, disabled options and what select-all means when filtering. Separate keyboard focus from committed selection: moving through results must follow the chosen interaction model, not an assumption that all dropdowns work alike.
Scope and test data
Use a required single-select delivery city and an optional multi-select skill field with a limit of three choices. Give options stable IDs, including two labels that intentionally match but have different contextual descriptions. The multi-select retains selected items while searching, excludes disabled items and applies select-all only to visible enabled matches. Search ignores letter case and trims surrounding spaces. Unknown free text is not a valid city. These are example product rules. WAI APG distinguishes combobox and listbox patterns, and offers different multi-selection keyboard models; agree the chosen model before execution.
The 30 cases below are a test design, not an execution report. Replace the example rules with approved requirements before recording pass or fail. Performance budgets and supported device versions must be agreed before execution.
Single selection and value integrity
| ID | Category | Test case | Expected result |
|---|---|---|---|
| M01 | Functional | Choose a city and submit | Submitted stable option ID maps to the displayed city |
| M02 | Negative | Submit the required city with only its placeholder visible | Required error appears; placeholder is not stored as a real option |
| M03 | Functional | Change from city A to city B | Only B is submitted and A is no longer selected |
| M04 | Functional | Reopen a saved form | Saved city ID displays the correct label |
| M05 | Negative | Attempt to choose a disabled city | Disabled option cannot become the submitted value |
| M06 | Functional | Choose between identical labels with distinct descriptions | Context distinguishes options and the intended ID is stored |
| M07 | Negative | Type a city name that has no valid option and submit | Free text is rejected with a selection prompt |
| M08 | Functional | Reset the form | City and skills return to the documented initial values |
Multiple selection and limits
| ID | Category | Test case | Expected result |
|---|---|---|---|
| M09 | Functional | Select one skill and then a second | Both IDs are stored once and both show selected state |
| M10 | Functional | Deselect one of two selected skills | Only the remaining ID is submitted |
| M11 | Boundary | Select exactly three skills | All three are accepted with the limit clearly indicated |
| M12 | Boundary | Try to add a fourth skill | Fourth selection is refused without dropping the first three |
| M13 | Functional | Search after selecting two skills outside the new results | Existing selections remain visible in the selection summary and in submission |
| M14 | Functional | Clear all selected skills | Empty list is saved because skills are optional |
| M15 | Functional | Use select-all with two visible enabled matches and no prior selection | Exactly those two IDs are selected; hidden and disabled options are excluded |
| M16 | Boundary | Use select-all when its additions would exceed three | Operation is refused with a limit message and prior selection remains intact |
| M17 | Functional | Remove a selected chip using its remove action | Correct ID is removed and focus lands on a usable control |
| M18 | Functional | Repeatedly toggle one option | Final state matches the final toggle; submitted list has no duplicate IDs |
Search, dependencies and stale data
| ID | Category | Test case | Expected result |
|---|---|---|---|
| M19 | Functional | Search the same label in mixed case and with surrounding spaces | Same matching option IDs appear as for the unpadded label |
| M20 | Negative | Search a term with no matches | No-results message appears while existing selections remain intact |
| M21 | Functional | Type query A then B and deliver A response last | Only B results remain selectable |
| M22 | Negative | Fail the option-loading request | Error and retry are visible; loading failure is not labelled as an empty catalogue |
| M23 | Functional | Change parent country after selecting a city | Incompatible city is cleared and new country options are loaded |
| M24 | Negative | Remove a previously selected option on the server before submission | Server rejects the stale selection and asks for a replacement |
| M25 | Security | Submit an unknown or unauthorised option ID directly | Server rejects it regardless of the browser options |
| M26 | Security | Render a fixture option label containing HTML-like text | Text is displayed without executing or inserting markup |
Keyboard, scale and compatibility
| ID | Category | Test case | Expected result |
|---|---|---|---|
| M27 | UI | Navigate and select with keyboard under the chosen APG model | Focus, committed selection and popup dismissal follow that model without a trap |
| M28 | UI | Inspect with a screen reader while selecting and removing items | Control label, expanded state where applicable, and selection changes are perceivable |
| M29 | Performance | Search and scroll the maximum supported option dataset | Response meets budget and virtualised results remain selectable without losing selections |
| M30 | Compatibility | Repeat choose, search, clear and limit tests on supported touch and desktop platforms | Saved IDs and limit enforcement agree; controls remain reachable at zoom |
Evidence and prioritisation
Prioritise M06, M12, M16, M21 and M25. Capture option IDs with labels and selected-state evidence; label-only screenshots cannot distinguish duplicates. The common mistake is applying a native-select automation helper to a custom popup. First identify the widget, then select using its public interaction model. The follow-up about select-all should establish whether it means visible matches or the full dataset; this suite deliberately chooses visible matches.
Downloads
Quick answers
Does keyboard focus always select an option?
No. Selection may follow focus in some single-select designs, while multi-select usually needs a distinct action. Test the approved interaction model.
Should filtered-out selections disappear?
This suite keeps them. If a product clears them, require a clear rule and visible feedback before writing the expected result.
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.
