background image
<< Record the ReturnHome action | Sign_in action >>
<< Record the ReturnHome action | Sign_in action >>
Reusable Actions
Lesson 8 · Dividing Tests into Multiple Actions
77
5 Return the Record and Run Settings to their original settings.
You changed the record and run settings for the purposes of recording the
ReturnHome action, but this change also affects the way QuickTest runs the
test. You want QuickTest to open a new browser to the Mercury Tours home
page when you run the test, so you need to reapply the original settings.
Choose Test > Run and Record Settings. The Record and Run Settings dialog
box opens.
In the Web tab, select Open the following browser when a record or run
session begins
. Confirm that
http://newtours.mercuryinteractive.com
is
displayed in the Address box and click OK.
6 Save the test.
Choose File > Save or click the Save button.
Setting Actions as Reusable Actions
Reusable actions are like functions in programming. When you have a
process that you may need to include in several tests, you record, modify,
and enhance the steps of the process and save them in a reusable action.
Then you can call the action from other tests, rather than recording,
modifying, and enhancing the same steps each time.
To call an action from another test, you must make it a reusable action in
the test with which it was stored. The Sign_in and ReturnHome action you
created in this lesson can apply to almost any test you might create on the
Mercury Tours site, so it makes sense to make them reusable actions.