To update a Web UI test with the guided healing feature, use the Collect data
to update test steps option while running the test. When the test is complete, you can
see the status of each step in the edited test and you can verify if the collected data is
appropriate to replace the objects that need to be updated.
About this task
You must perform this task from the Web UI Test perspective. This task applies to Web UI
tests.
Procedure
- Run the test from the Test editor. In the Run
configuration dialog box, select Collect data to update test steps
to activate Guided Healing. Web UI data is collected during the test execution. Snapshots are taken and they are used to
update the failed steps. If an object is not formally identified during the test run, the object whose description
matches the best is selected as the possible candidate.
The Web UI report clearly indicates
whether a step is passed through the guided healing option or not. The steps that were run with the
Collect data to update test steps option are highlighted as amber color and
the execution status displays as inconclusive in the report.
- In the test editor, click Scan and mark test with latest result
to see the status of the test steps. In the test script, the failed steps are shown in red
color, the passed steps in green color, and the steps that need to be updated are in amber
color. Note: The highlighted colors for test step results can be modified in .
- Click the step that is in amber color. The snapshot captured during the playback is displayed
in the User Action Details view under the Step result
tab.
- If the AI algorithm has identified the element that best matches the object as it is described
in the test script, click Replace snapshot and hierarchy to update the test.
The new captured snapshot is copied in the Mobile and Web UI Data view under
the Screen Capture section.
Note: Repeat the instructions for any other step failures that were caused by changes in the UI of
the application under test.
- Save the test.
Note: When a test step fails with Time Out Error, because of low time out values, the snapshot of
the web page may not be captured. Ensure you have enough timeout for each test step before running
the test to get proper snapshots and enable the guided healing option.
- Because adding the snapshots to the test increases the size of the test, you might want to
remove the snapshots when test development is complete:
- To remove all the snapshots in the test, right-click the test in the Test
Contents window and click Delete snapshots and hierarchies.
- To retrieve the snapshots taken during the last test run, select the steps for which you
require snapshot retrieval, right-click and select Replace snapshots and
hierarchies. The change applies only to the selected steps.
Results
The test is updated and can be run with no failures.