Updating a test with manual Guided Healing

If you select collecting data option when you run your tests but keep the automatic update option unselected, manual test update is implicit. 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 are appropriate to replace the objects that need to be updated.

About this task

This task must be performed from the Web UI Test perspective.

Procedure

  1. Run the test from the Test editor. In the Run configuration dialog box, select Collect data to update test steps to activate intelligent testing (Guided Healing).
    Select the option 'Collect data to update test steps' to enable intelligent testing feature
    Web UI data are 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, this is the object whose description matches the best that is selected as the possible candidate. In the Web UI Report, you can see the steps identified with the following message: 'An action has been performed on the most appropriate object'.
  2. In the test editor, click Scan and mark test with latest result 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 updated steps are in amber color.
    Note: The highlighted colors for test step results can be modified in Window > Preferences > Test > Mobile and Web UI > Test Step Results.
  3. 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.
    Object that matches best
  4. If the Guided Healing 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. Repeat the instructions for any other step failures that were caused by changes in the UI of the application under test.
  5. Save the test.
    Note: In case of low time out values when a test step fails with Time Out Error, the snapshot of the web page may not be captured. Ensure enough timeout for each test step before running the test to get proper snapshots and enable Guided Healing.
  6. 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.
    1. To remove all the snapshots in the test, right-click the test in the Test Contents window and click Delete snapshots and hierarchies.
    2. 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.

Feedback