Test Cases For Dropdown

Dropdown Test Cases: Comprehensive test case coverage is essential to validate functionality when testing systems that utilize dropdown controls like country dropdowns. Test cases for dropdown fields should include validation checks, default value verifications, selections from the drop down list, boundary checks on drop down list lengths, and test cases for dropdowns dependent on other field values.

By thoroughly testing the behaviours of dropdowns and drop-down lists across interfaces and device types, defects can be effectively identified before system releases. This document outlines key test cases for validation and interactions involving dropdown user interface elements.

Post On:Dropdown Test Cases
Post Type:Test Case QA
Published On:www.softwaretestingo.com
Applicable For:Freshers & Experience
Social GroupJoin SoftwareTestingo On Telegram

What are the Acceptance Criteria for our filters?

As discussed in our requirements post, we must have functional requirements. So, let’s go ahead and define them as such:

Description: “As an online retailer, users must be able to select and filter the category of product they are searching.”

Test Cases For Drop-Down List Acceptance Criteria

  • Display a complete list of product database categories in the filter dropdown.
  • Show products tagged with the same category as selected in the dropdown.
  • What are the Filters Test Scenarios?
  • We will want to document several test scenarios to successfully create test cases for filters. At a high level, they will include:

Likewise, I can give an N number of scenarios. For that, I need more requirements. Whatever points I have given you are just for a simple drop-down.

Test Cases For Dropdown 1

Test Cases For Dropdown

  • Check whether the dropdown is clickable or not.
  • Check if the drop-down is open by clicking on both the drop-down & the drop-down Arrow.
  • Check the maximum character that can be displayed in the filter text area.
  • Check whether the filter is responsive on the desktop, laptop, mobile phone, and tablet.
  • Check by clicking over the drop-down. The filter is expanding.
  • Check on the click outside of the drop-down; the filter should collapse.
  • Clicking inside the drop-down should display the filter options before the search. (example, Google Search)
  • Check that the selected filter value is displayed in the filter.
  • Check that the filter values match the database values. (If filter values are coming from the database)
  • Check search results before applying filters to ensure they are accurate and complete.
  • Check the filter results match the selected filter.
  • Check outside results have not appeared in the filter results.
  • Check if the filter UI works properly on all browsers your team certifies (if it is a web application).
  • Check if there is an option to clear the selected filter value.
  • Check depending on business requirements; check if a custom criteria filter can be applied.
  • The filter options persist from session to session – depending on business requirements.
  • Check if the results are sorted by relevance.
  • Check the keywords and sort the results.
  • Check if the filter option can be applied without selecting any value.
  • Check the maximum number of values in the dropdown with the scroll bar.

Negative Test Cases For Dropdown

  • Pressing the arrow does not give the list of items.
  • The list should be scrollable, and you should not be able to type text in the box.
  • Pressing a letter should bring you to the first items with a start with that letter.
  • The Drop-down with the selected item should be displayed at the top of the list.
  • Make sure only one space appears and should not have a blank line at the bottom.
  • Check the data is not loaded into the dropdown list on page load.
  • Check the checkbox does not have a label.
  • Try to enter data.
  • Try to check more than one option.
  • The Drop-down with the selected item should be displayed at the top of the list.

If Search is added in the Dropdown,

  • Check whether all values are added to the dropdown list or not.
  • Check that the label text for the dropdown should be as per requirements and aligned or not.
  • Check on clicking on the dropdown; it should display a list containing values.
  • Check whether the dropdown displays all values as the user clicks on the dropdown.
  • Check whether the scroll-down functionality is working in the dropdown list or not.
  • Check that the drop-down list should be scrolled down by pressing the down arrow key on the keyboard.
  • Check whether the default selected value is shown on the dropdown or not.
  • Check that the dropdown should not be editable.
  • Check whether the order of the values in the dropdown list is the same as the requirement.
  • Check that there are no blank values in the dropdown list.
  • Check whether dropdown values are case-sensitive or not, as a system requires.
  • Check that the dropdown values should be accessible and selected by clicking on the alphabet from the keyboard.
  • Check dropdown list design should not be disturbed on all browsers.
  • Check the spelling for the values in the dropdown list.
  • Check whether all the values are aligned or not.
  • Check on mouse hover mouse pointer change from a pointer to hand or not.
  • Check whether proper spacing is added between the values or not.
  • Check whether or not the mouse hover effect is added to the dropdown list.
  • Check whether the text length for the maximum char or words is shown in the dropdown.
  • Check that the user can choose any value from the dropdown by clicking on the tab button on the keyboard.
  • Check whether the search field should be clickable or not by clicking on the search field.
  • Check whether the text is added in the search field from keyboard typing.
  • Check that the user can paste the text in the search field by mouse.
  • Check that the value from the list should be selected if the user adds a valid keyword.
  • Check that a proper error message is shown if the user adds an invalid keyword.

Test Cases For Multi-Select Dropdown Filter

We all know about the multiple-item selection drop-down list. It is used to select multiple items under a box or menu. By selecting items, we can categorize the list with the help of a drop-down menu. By default, the drop-down list will display only one item. Below are some test cases which should be considered when we test a drop-down selection box.

  • Check that the design of the drop-down is proper. It should be aligned with other items on the page on all browsers.
  • Check if the design can be handled for the longest text in its list.
  • Check if the user can select other values from the list by clicking the down arrow key on the keyboard.
  • Check if the dropdown has a proper title.
  • Check if the default text is displayed in the dropdown filter.
  • Check if the selected items of the drop-down list are highlighted or not.
  • Check the loading time of the drop-down list; it should not take too long to load.
  • Check if the list of drop-downs is controlled by some other selection (like when we select an item from drop-down “A” is binding the values in drop-down “B”), then the correctness of the items listed independent drop-down should be proper.
  • Check if the selection in the drop-down controls some other controls (enabling/disabling), then check the proper action.
  • When the user presses the keyboard alphabet, items starting with the respective alphabet should be displayed.
  • Check if the user selects all; the none button should be available.
  • The design of the drop-down may change on various browsers, which is a common problem; browser compatibility of the drop-down should be consistent in all browsers.

Conclusion:

Writing effective test cases for dropdowns is integral to ensuring a system’s functionality and user experience. The meticulous design and execution of these test cases play a pivotal role in identifying and rectifying potential issues.

As we strive to provide comprehensive insights into creating robust test scenarios for dropdowns, your feedback is invaluable. If you have any suggestions, questions, or additional insights that could enhance the content, please feel free to drop a comment below. Your input is crucial in our continuous efforts to improve and deliver content that truly meets your needs. Thank you for being part of this learning journey!

I love open-source technologies and am very passionate about software development. I like to share my knowledge with others, especially on technology that's why I have given all the examples as simple as possible to understand for beginners. All the code posted on my blog is developed, compiled, and tested in my development environment. If you find any mistakes or bugs, Please drop an email to softwaretestingo.com@gmail.com, or You can join me on Linkedin.

Leave a Comment