Self Healing Tests

The achilles heel of test automation is dealing with applications that either change repeatedly or are not well designed for test automation in the first place. Rapise has a completely new approach to locating objects on a web page that based on our research and development will yield significantly better results in creating tests that work without alteration, even when the application being tested changes, or when the application uses dynamic IDs and attributes.

How Does it Work?

When used in self-healing mode, Rapise generates a “full-path locator” for each recorded element. The full-path locator includes information about all the attributes of an element and attributes of its ancestors in the DOM tree.

When you run a previously recorded test, and the element is found with a traditional XPath locator then this new full-path locator is not used (there is nothing to repair).

But if the standard XPath generated for an element during recording or manually created by a tester is not valid then the new full-path locator is used instead to find the most suitable element on the page (using the fruits of our big data analysis and machine learning algorithms).

When the full-path locator is used you get the following healing notification in the report:


Self-Healing in Action

The healing notification indicates that an element was found with some confidence, it is a number from zero to 100%. In the notification details you can find the difference between recorded and matched elements. You can also see the images of the recorded and found elements. This information is a clue to either accept the found element or manually fix the test.

When you come across such a situation, you can then do one of three things:

  • Take no Action - This is the simplest yet powerful approach. If a test passes and all elements are found with pretty good confidence, then there may be no reason to "fix" the test.
  • Build a WebAppProfile - When you analyze differences between the expected and found elements you use that to create or update your WebAppProfile.
  • Use the Object Manager - During playback, Rapise takes snapshots of elements found by the full-path locator. So after playback you can use the Object Manager to replace the old locators with new ones. If there are healing notifications after test playback Rapise automatically shows the prompt to open the Object Manager.

Benefits of Self-Healing Tests

The main benefits of the new self-healing tests are:

  • Increases the stability of tests created using the Rapise automated recording, making it a viable technique for complex, modern web applications
  • Reduces the maintenance cost of having to manually update the CSS or XPATH locators whenever a web application is changed by the developers during an agile sprint.
  • Provides deeper insights to changes in tested application which aid the developers and testers in diagnosing issues introduced in application updates.

Try Rapise free for 30 days, no credit cards, no contracts

Start My Free Trial

And if you have any questions, please email or call us at +1 (202) 558-6885