When you play back Web UI tests that use the image property to match target with actual
images, the tests fail if there is a mismatch. You can use the guided healing feature that
provides the capability of finding the next best matching image so that the tests can
pass.
The UI of an application might undergo changes during the development phases. When your test
does not adapt to the changes in the UI elements, the probability is high that your test might
fail. When you enable guided healing feature, during playback, if an object is not formally
identified, then the next best matching image is selected as the possible candidate. You can
choose to update the images to the test either automatically or manually.
The following procedure describes about updating the images automatically.
-
Run the recorded Web UI test from the test editor.
-
Select the Collect data to update test steps check box in the
Run Configuration dialog.
The guided healing feature is enabled.
-
Select the Automatically update the test at the end of playback
check box to update each test step with the identified images.
-
Click Next, and then click Finish.
After the test run is complete, the Web UI test report is generated.
-
In the test editor pane, click Scan and mark test with latest result
to view the status of the test steps.
The test steps and the images highlighted in the test steps are indicated with different
colors to specify the status of each test step. You can refer to the following table to
understand the meaning of each color:
Step color |
Explanation |
Indication of the test result |
Green |
During playback, the target object that matched the actual object was found based
on the correlation score. |
The test step is passed. |
Amber |
During playback, the best matching target object was not found. Then, the next
closest matching image was identified as the target object based on the correlation
score. |
The test step is partially passed. |
During the playback, the test steps are updated with the newly identified
images.
The test steps are passed and displayed in black color.