[WEB/SOFTWARE TESTING CHECKLISTS] Search Field - What are the Test Cases to be considered while testing a Search field?

| | 2 min read

Search box helps a user to search data within the website. Following are the test cases / checklists for default Drupal 7 search box

  1. Ensure that the system displays all possible search results on searching valid data (alphanumerics) in the search box.
  2. Ensure that corresponding pages are loaded on clicking the search results.
  3. Ensure that the most suitable search results are displayed at the top of the result list.
  4. Ensure that an error message is displayed on searching invalid data in the search box.
  5. Drupal 7 default error message for an invalid entry is:

    • “Your search yielded no results
    • Check if your spelling is correct.
    • Remove quotes around phrases to search for each word individually. bike shed will often show more results than "bikeshed".
    • Consider loosening your query with OR. bike OR shed will often show more results than bike shed. “
  6. Ensure that an error message “Please enter some keywords” is displayed when the user clicks the search button without entering any data to search.
  7. Ensure that users are able to search by clicking the search button as well as by pressing enter key.
  8. Ensure that an error message is displayed on entering characters less than the expected default minimum value for Drupal 7 search box.
    The default error message for Drupal 7 search box is "You must include at least one positive keyword with 3 characters or more".
  9. Ensure that the search box consists of a Placeholder text and a magnifying lens.
  10. Ensure that the Placeholder text gets removed on clicking the search box.