Searching a test

You can quickly locate values of interest inside specified test elements by searching.

To search a test:

  1. Open the test.
  2. From the menu bar, select Search > Search: The Search dialog box opens with the Test Search tab selected.

  3. In Search for text, type the text that you want to locate.

    This field can be left blank depending on your search strategy. For example, if you know that a string occurs in elements or element instances that you are not interested in, using the options described in steps 4, 6, and 8, you can locate the elements or element instances of interest before entering the search text into this field.

  4. If you want to search only in elements that are currently selected in the Test Contents, check Restrict search to elements highlighted in Test Contents.
  5. Check Case sensitive if you want a case-sensitive search.
  6. If you want elements that are found to be highlighted in the Test Contents, check Highlight found elements in Test Contents. This option is provided so that, using the option described in step 4, you can designate the element instances of interest before specifying the text of interest.
  7. Check Recursive if you want a search to wrap to the beginning and continue when the end of the test is reached.
  8. In Elements to search, check all test elements that should be searched.

    Note that checking the box in step 4 restricts the elements that you select here to the instances that are selected in the Test Contents. For example, if you select HTTP Pages here and only one page is selected in the Test Contents, only that page is found. If the box in step 4 is not checked, every test page is found.

  9. (Optional) Click selected elements and qualify how they should be searched.

    If you click an element, a panel opens allowing you to qualify how that element should be searched. The following figure shows the search qualifications available when you check HTTP Requests.

    If you want only to locate items, continue to the next step. If you want to replace found strings, click Replace and go to step 12.

  10. Click Search. The results of your search appear in two views: the Search view, listing objects containing matches, and the Test Search Match Preview view, which displays the matches found. The Search view is illustrated in the following figure. URL: Offset: 36 and URL: Offset: 85 designate objects in which the search text was found.

  11. In the Search view, perform search actions:
    1. To preview a found string in the Test Search Match Preview, click the object.
    2. To jump to your test, at the location where an instance was found, double-click the object.
    3. To perform a different search action (proceed to the next or previous match, replace, etc.), right-click the object and select your choice.
  12. If you clicked Replace in step 10, the Replace dialog box opens.

  13. In the With field, type the replacement text for the text you entered in step 3.
  14. Select the replacement action by clicking the appropriate button. If you are doing selective replacements, found instances are displayed in order in the Test Search Match Preview view. Click a replace or skip button until all found instances that you are interested in have been displayed.

Parent topic: Editing tests

Terms of use | Feedback
(C) Copyright IBM Corporation 2005. All Rights Reserved.