Skip to main content

AutoHeal and AutoFix for Codeless Test Automation

Overview

Self-Healing Test Codeless Automation Using an intelligent software testing solution used to prevent any test issues that arise due to changes in the application’s UI or web/mobile elements. Each test case relies on verifying specific web elements identified by locators like name, ID, XPath, and type. However, continuous changes in the application can alter these elements, leading to test failures due to UI mismatches.

Step 1: Log in to the TestGrid Platform using valid credentials.

 

Step 2: Before starting the scriptless generator session, go to the project configuration and check the auto-heal configuration.

Notes: Verify that the Autofix function is disabled and the Autoheal functionality is enabled by default.

  • If a website or mobile application contains dynamic elements, the AutoHeal functionality detects the correct locator for those elements during runtime. If the element or its locator is not found, AutoHeal attempts to use other similar stored locators that were saved when the locator was captured using the Element Picker or Record & Play. It then checks whether any of those locators work. If a valid locator is found, the test case passes.
  • The Autofix button will appear in the logs when AutoHeal tries an element and it works. This allows users to identify and confirm that the element is working. Users can set this element as the default for the next build run, so when the next build runs, it uses this element, reducing execution time.

Example :

  • Write a basic login flow for the website https://www.facebook.com.
  •  Refer to the Web Test Generate and TestCase Execution from Test Case Versioning & Management
  • Go to the scriptless generator, create a new test case, type the test case name, enter the URL, select browsers or devices, and then click the start generating test case button.

Step 4: As per the below image, elements email0 and pass0 are generated from our codeless tool.

Step 5: Once again, go to the test cases and run the saved test case.

Step 6: The auto-heal functionality executes the element email0, similarly for pass0.

Step 7: As you can see in the last step, the test case passed with the auto-heal feature.



Table of Contents