Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Self Healing feature is useful when the web pages, on which the test case is recorded, keep changing and so their locators are. If the Self Healing Mode is enabled, QAS does its best to automatically replace locators to run the test successfully. Even if the test fails, QAS gives the user an opportunity to select a suitable locator on the web browser and add it to the script directly. The test will run again automatically from where it failed which will make the test case "Pass".
The Self healing feature covers the following use cases:
  • During execution, if a test step locator is failed to be detected by its default locator value, the other locator strategies in the list will be automatically applied without any manual intervention from the tester. The execution will continue as if no failures has happened.
  • During execution, if a test step locator is failed and can't be auto detected using any of the other locator strategies, QAS will pause the execution, allow user to select the relevant element and continue the execution. The new locator strategy will be auto updated for the next execution.  

...

When the test is executed with Self Healing Mode, it will heal the broken elements, replace those elements with new locators and cause the test to pass.




View Self Healing Logs

Once you execute the test in Self Healing mode, you can view the logs under the Self-healing Insights. All the replacements of locators taken place during test case execution in Self Healing mode are recorded under Self-healing Insights once the execution is complete.

Click on the test case and select the Self-healing Insights option on the menu.


Image Added


The Self-healing Insights screen opens.


Image Added


The screen shows details of the Test Case name, the impacted command, which object and element were broken, which object and element were recovered, and replaced elements.

  • Test Case: Name of the test case during the execution of which the locators have been replaced through the Self- healing mode.

  • Command: The impacted Command in the test case code where the locators were replaced.

  • Broken Object: The object which the default locator could not detect during the test execution.

  • Broken Element: The element that could not be traced by the default locator during the test execution. 

  • Recovered Object: The object that is healed and located through the alternative locator during the execution in self-healing mode.

  • Recovered Element: The new/alternative locator found through self-healing mode during the execution.

  • Replaced Element: In case all the elements of the test case are failed, you need to find the new locators on the UI through the Object Spy functionality of QAS. The original elements are replaced by the newly found elements to run the test successfully. To view the details of replaced elements, click on the view the icon for the test case.


The element details - Old Elements and Replaced Elements are available to view by clicking on view the icon.


Image Added