background image
<< Sign_in action | Call to Existing Action >>
<< Sign_in action | Call to Existing Action >>
Inserting Existing Actions
Lesson 8 Dividing Tests into Multiple Actions
79
Inserting Existing Actions
When you plan a suite of tests, you may realize that each test requires one or
more identical activities, such as signing in. Once you have created the
action and stored it with one test, you can insert either a call to a copy of
the existing action, or a call to the existing action, into other tests.
When you insert a call to copy of an existing action, you can make changes
to the copied action, and your changes will neither affect, nor be affected
by, any other test. Calls to existing actions, however, are read-only in the
calling test. They can be modified only in the test with which they were
stored. Calls to existing actions enable you to call the same action from
several tests and make it easy to maintain tests, because when your
application changes you only have to update the existing action stored with
the original test.
In the following exercises you will create a new test that is similar to the
ActionA test, except that the Sign_in and ReturnHome actions are external
actions (calls to existing actions stored with other tests) and the FlightOrder
action is slightly modified.
Inserting Calls to Actions
First, you will insert calls to the reusable Sign_in and ReturnHome actions
from ActionA into ActionB.
1 Open a new test.
For more information, see step 1 of "Recording a Test," on page 10.
2 Insert a call to the Sign_in action.