About Saving and Reusing Test Statements

A powerful feature of IBM® Rational® Manual Tester is the ability to save testing instructions, called statements, in manual test scripts and reuse them in other scripts. Reusing statements saves time when authoring scripts and when updating scripts to reflect changes to the application.

Saving and reusing test statements is particularly helpful for statements that appear frequently in your scripts; for example, logging onto an application or typing a user name and password.

To save test content for reuse, you select one or more statements or groups of statements in the Outline view and drag them into the Reuse view. The Reuse view is a collection of the statements you have saved for reuse. It is available whenever you open Manual Tester, so you can use the reusable statements in any manual test scripts.

If you want to create a reusable statement using copy and paste, press Ctrl+C to copy and Ctrl+R to paste a reference copy. When you paste the statement, Manual Tester displays a message asking if you want to add the pasted item to your list of reusable statements. Click Yes to save the statement for reuse. Manual Tester adds the statement to the Reuse view. If you click No, Manual Tester pastes the referenced statement, but does not add it to the Reuse view.

When you copy a statement and paste it as a referenced statement in a different location in the same file, Manual Tester does not include the statement in a gray box. When you edit a referenced statement in a file, Manual Tester automatically updates all the copies of the statement in the file. When you copy a statement to a different file, Manual Tester includes the statement in a gray box. When you edit the original source of the statement, Manual Tester updates all instances of the statement. You can paste a cut statement once; you can paste a copied statement several times.

You can organize the Reuse view by dragging statements or groups of statements into any order you want. You can also create folders and drag statements into them.

When you want to reuse reusable statements, you simply drag the content from the Reuse view to where you want it in the Outline view. Manual Tester inserts the content into your script in a gray box to indicate that it is a reference to reusable statements.

Note: You can change the background color in which Manual Tester displays reusable statements in a manual test script. See Setting Manual Tester Preferences for more information.

To further indicate references to reusable statements, Manual Tester uses slightly different icons for each statement type. The icons that indicate a reference to reusable statements have a small arrow in the lower left corner. The following table lists the icons that Manual Tester uses when the four different types of statements are reused:

Icon Type of Reusable Statement
Reused Step Icon Step
Reused verification point icon Verification point
Reused reporting point icon Reporting point
Reused group folder icon Group folder
Note: The tutorial Reusing Saved Test Content shows you how to save statements for reuse. In the tutorial, you will create a new manual test script and reuse the statements you saved. To start the tutorial:
  1. From the Manual Tester menu, click Help > Tutorials Gallery.
  2. In the left pane of the Tutorials Gallery, expand Do and Learn.
  3. Click Reusing Saved Test Content in a Manual Tester Script.
Reusing reusable statements makes it easy to update manual test scripts when the application being tested changes. When it is necessary to change reusable statements, you make edits in the original script; Manual Tester can automatically update all scripts that use the statements. You can easily locate the script where the statements were originally authored by right-clicking the statements in the Reuse view and clicking Open Script. You can also open the test script in which the statements were originally authored by either right-clicking on a reusable statement in a script and clicking Open Script or by clicking on a reusable statement and selecting Edit > Open Script.
Note: When you modify or delete a reusable statement, Manual Tester does not update the Reuse view until you save the script in which the statement was originally authored.
Note: The tutorial Updating and Maintaining Test Scripts shows you how to update saved test content in the script in which it was originally authored. To start the tutorial:
  1. From the Manual Tester menu, click Help > Tutorials Gallery.
  2. In the left pane of the Tutorials Gallery, expand Do and Learn.
  3. Click Updating and Maintaining Scripts.
If you do not want Manual Tester to update all scripts that contain a specific saved statement, you can remove the reference for specific scripts. Before you edit the original script, click in the gray box of the reusable statements you do not want updated and click Edit > Make Statement Local. This breaks the reference to the original script and leaves the script unchanged.
Note: To remove a reference to a group, click in the group folder heading. Removing a reference to a reusable group affects the entire group. You cannot remove a reference to only one or more statements within a group.

By default, Manual Tester stores the file containing all the reusable statements in C:\Documents and Settings\username\MTA. You can use the Main Preferences page of the Preferences dialog box to set a different reuse file location.

Parent topic: Saving and Reusing Test Statements

Related tasks
Saving Statements for Reuse
Reusing Test Statements
Editing Reusable Statements
Organizing the Reuse View
Removing a Reference to a Reusable Statement
Deleting Reusable Statements
Setting Manual Tester Preferences

Related reference
Outline View
Reuse View

Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.