Lesson 5: Splitting actions in a test
You can learn about splitting the actions of a test into test segments with different nodes. If a test contains many actions, you can split the test to create multiple nodes with meaningful test segments. You can then perform various actions such as inserting a loop, inserting a condition, and so on to the test segments of the selected nodes. You can also move a node from the existing test to a new test, and add the new test to a compound test that consists of various other tests that can be run sequentially.
Before you begin
You must have completed the following tasks:
- Generated a Web UI test. See Lesson 1: Recording actions on an AUT.
- Read and been familiar with performing various actions on the nodes within a test. See Editing Web UI tests.
- Read and been familiar with the concept of compound tests. See Compound tests.
- Ensured that the Test Contents panel of the test editor window is displayed.
About this task
For the test scenario in this tutorial, you can split the actions that are related to logging in and searching into two different test segments. You can then group the actions related to searching and move them to a new test segment.
Procedure
- Select the actions from search to logout in the test that is displayed on the Test Contents panel.
-
Right-click the selected actions, and then click Split UI
actions.
The Refactoring test to split UI actions from current selection dialog is displayed with the changes that you performed as a result of the split.
-
Click Finish.
The In application node is displayed in the Test Contents panel, and the node contains all the actions that are split.
-
Click
to create an empty test.The New Test dialog is displayed.
-
Perform the following steps in the New Test dialog:
-
Right-click the In application node in the Test
Contents panel of the wiki-search test, and
then click Cut.
-
Right-click the root node of the wiki-search-animals test,
and then click Paste.
The steps from the In application node of the wiki-search test are added to the wiki-search-animals test.
- Click .