Example: A Feature of a Word Processor

For purposes of illustration, this topic develops test requirements for the searching feature of the sample Text Editor application using the Find dialog box. This topic contains the following:

When a user enters the criteria for the search and clicks Find Next, the search feature attempts to locate the string. If the string is found, it is selected (highlighted). Otherwise, an informational message is displayed.

Determining what data the feature expects

A user can enter three pieces of information in the Find dialog box:

  • The search can be case sensitive or insensitive, depending on whether the Case Sensitive check box is checked or unchecked.
  • The search can be forward or backward, depending on whether the Down or Up option button is clicked.
  • The search can be for any combination of characters, depending on the value entered in the Find What text box.

Creating meaningful data combinations

To organize this information, it is helpful to construct a table that lists the possible combinations of inputs. From this list, you can then decide which combinations are meaningful and should be tested. A partial table for the Find dialog box is shown below:

Case Sensitive Direction Search String
Yes Down Character
Yes Down Partial word (start)
Yes Down Partial word (end)
Yes Down Word
Yes Down Group of words
Yes Up Character
Yes Up Partial word (start)
Yes Up Partial word (end)
Yes Up Word
Yes Up Group of words

Overview of recording the stages of a test case

A test case performs the included actions in three stages. The following table illustrates these stages, describing in high-level terms the steps for each stage of a sample test case that tests whether the Find facility is working.

Setup
  1. Open a new document.
  2. Type text into the document.
  3. Position the text cursor either before or after the text, depending on the direction of the search.
  4. Select Find from the Search menu.
  5. In the Find dialog box:
    • Enter the text to search for in the Find What text box.
    • Select a direction for the search.
    • Make the search case sensitive or not.
    • Click Find Next to do the search.
  6. Click Cancel to close the Find dialog box.
Verify
Record a 4Test verification statement that checks that the actual search string found, if any, is the expected search string.
Cleanup
  1. Close the document.
  2. Click No when prompted to save the file.

After learning the basics of recording, you can record from within a test plan, which makes recording easier by automatically generating the links that connect the test plan to the test case.