When a set of steps are repeated and required in multiple tests, you can create a
test module for such repeatable steps. You can select the required steps that are in
sequence from an existing test and extract them to create a new test module. After
extraction, the selected steps are replaced by the Run step and the
new test module is listed in the test navigator panel.
About this task
When you extract a set of steps, the resulting asset might
be one of the following types:
- A test with the application or page URL details in the
Open step. You can play back this type of test.
- A module without the application or page URL. You must add the required URL by
adding the details in the Configure settings and data
step or Open step.
Procedure
-
Click the
button displayed on the Test
Editor page.
The Edit button appears only when no active edit
branch is selected.
Alternatively, right-click the test in the test navigator panel and select
Edit.
The Edit branch dialog is displayed.
If the
Edit branch dialog is not displayed, then go to
step
2.
-
Right-click a step or a container and click
Select.
Checkboxes are displayed for each step.
-
Select the checkboxes to select a set of steps or a container with multiple
steps in sequence.
-
Right-click a selected step and click Extract
Steps.
The Create Test from Steps dialog is displayed. The
Extracted Content text box displays the list of
selected steps and the Application field displays the
application for which you create the test.
-
Enter a name for the test in Asset Name.
-
Select an existing folder from the list in Location to
save the test assets that you are creating.
Alternatively, click New Folder to create a folder to
save the test assets.
-
Click Create.
The selected steps are replaced by the
Run step for the
new test module and the newly created test module is listed in the test
navigator panel.
Note: When you save the test under a
different application by using the Save As option, on
clicking the step, the step details pane displays the Error
loading smartshot message for all test steps. To resolve
this error, you can either manually insert a suitable smartshot from the new
application by using the Replace Smartshot option in
the step details pane, or you can play back the test and save the required
smartshots directly from the test results.
Results
You have created a test module by extracting a set of steps from the existing test.