Self Healing Feature in TOSCA

A Simple Guide to the Self Healing Feature in TOSCA

Table of Contents

With modern applications constantly changing and UI updates happening frequently, automated tests tend to break more often. Fortunately, the Self Healing Feature in TOSCA addresses this challenge by providing a smart and resilient mechanism to keep your test cases running even when the UI elements change. This comprehensive guide walks you through the step-by-step process of implementing the Self Healing Feature in TOSCA using a demo web application, with best practices and configurations to ensure robust automation.

If you’re preparing for the Tricentis TOSCA Certification, learning this feature is vital. It also plays a critical role in mastering any TOSCA Automation Tutorial and is commonly taught in structured TOSCA Training Online programs.

Introduction to the Self Healing Feature in TOSCA

Modern web applications are agile, continuously updated, and frequently redesigned. This flexibility creates a challenge for automated testing tools that rely on fixed identifiers or element properties to locate controls. Every small change in a web element’s label or ID can result in test failures.

That’s where the Self Healing Feature in TOSCA comes in. It enhances the resilience of your test cases by dynamically adjusting the way elements are identified when changes are detected. This feature helps reduce maintenance efforts, ensures higher test stability, and allows QA teams to focus on expanding test coverage instead of fixing broken tests.

Let’s explore how this works with a hands-on walkthrough using Tricentis’s Demo Web Shop.

Demo Application for Self Healing

We will use the Demo Web Shop application provided by Tricentis as the test subject. It mimics real-world scenarios like user login, product browsing, and shopping cart activities, making it an ideal environment to understand the Self Healing Feature in TOSCA.

Step-by-Step Guide to Apply Self-Healing in TOSCA

1. Initial Scan and Test Case Execution

Step 1: Scan the Web Application

Open Tosca Commander and initiate a scan of the demo application to capture the necessary UI elements (controls). For example, scan the Login page and capture elements like Email, Password, and the Login button.

Step 2: Create and Execute the Test Case

Use the scanned modules to create a test case that performs a login operation. Set the input values and execute the test. The execution should pass, confirming the initial test setup is successful.

2. Simulate a UI Change

To demonstrate how the Self Healing Feature in TOSCA works, we’ll simulate a common change.

Step 3: Modify the Label of a Web Element

Use the browser’s Developer Tools (Inspect Element) to change the label of a target control, such as renaming the “Email” label to “Email ID”.

This mimics what happens when a developer updates UI text in a production environment without changing underlying IDs or attributes.

3. Re-Execute the Test Case

Step 4: Run the Test Case Again

After modifying the label, re-run the same test case without any changes in Tosca. The test should fail because Tosca cannot find the control with the new label. This step clearly highlights the problem that the Self Healing Feature in TOSCA is designed to solve.

4. Apply the Self-Healing Feature in TOSCA

Step 5: Rescan the Control

Open the corresponding module in Tosca and rescan the control (e.g., the email input field).

In the Rescan window, TOSCA will attempt to identify the control again. This time, click the Self-Healing icon.

Self Healing Feature in TOSCA

According to the official documentation, the Self-Healing feature uses an algorithm that adds additional identifying properties to the control automatically. If the automatic identification does not suffice, you can manually add more properties.

Step 6: Save the Updated Control

Once the Self-Healing operation is completed and the correct control is identified, save and close the Rescan window.

5. Configure Self-Healing in the Test Case

Now that the control is re-identified, configure the test case to use the Self-Healing mechanism.

Step 7: Add the SelfHealing Configuration Parameter

Open the test case in Tosca Commander and add a configuration parameter named SelfHealing. Set its value to one of the following options:

  • Weighted – Uses a weighted algorithm to match the updated control.
  • Combination – Matches control using combined properties.
  • False – Turns off the Self-Healing feature.

Step 8: Set the Weight Threshold (TCP)

Add a Test Configuration Parameter (TCP) named SelfHealingWeightThreshold. This threshold defines how strict Tosca is in evaluating matches. The default value is 0.75.

Self Healing Feature in TOSCA

Based on your system’s regional settings, this value should be entered as 0.75 or 0,75. Combinations scoring below the threshold will be ignored by Tosca’s algorithm during self-healing.

6. Run the Updated Test Case

Step 9: Confirm the Updated Web Element

Ensure that your simulated UI still shows the updated label (e.g., “Email ID” instead of “Email”).

Step 10: Execute the Test Case

Run the updated test case again. With the Self Healing Feature in TOSCA enabled, Tosca will now recognize the control even though the label was changed, and the test will pass successfully.

This shows how effective Self-Healing is in handling dynamic UI changes without requiring test rework.

Behind the Scenes: How Self-Healing Works

When Tosca identifies a control during a test, it relies on specific properties (e.g., label, ID, CSS selector). If a property changes, Tosca’s Self-Healing engine compares stored properties with current UI properties and calculates a match score.

If this score exceeds the Self Healing Weight Threshold, the control is matched and used. This automatic property matching helps maintain stability in automation without constant manual intervention.

The Tricentis documentation explains that Tosca calculates a “weight” based on several properties. The more unique and stable a property is, the higher its weight. When the test runs and Tosca cannot find the original control, it tries alternate matches based on the calculated weight.

Best Practices for Using the Self Healing Feature in TOSCA

Here are a few recommended best practices to make the most of the Self Healing Feature in TOSCA:

1. Choose the Right Matching Strategy

Understand when to use Weighted vs Combination mode. If your application has many similar controls, Combination provides more reliable identification by combining multiple properties.

2. Keep the Self-Healing Weight Threshold Balanced

Avoid setting the threshold too low, which might lead to false-positive matches. A value around 0.75 is optimal in most cases.

3. Review Rescan Results

Always validate Tosca’s suggestions during the Rescan process. Don’t rely solely on the automatic matching double-check critical test steps.

4. Update Test Configuration Parameters (TCPs) Globally

You can define SelfHealing and SelfHealingWeightThreshold as project-level TCPs so they apply across multiple test cases consistently.

5. Avoid Over-Reliance

The Self Healing Feature in TOSCA is powerful, but it shouldn’t replace robust test design. Continue to use best practices such as stable identifiers, modular test cases, and regular test maintenance.

6. Test in Real Scenarios

Test your self-healing configuration by making minor, controlled changes in your application’s UI and ensuring Tosca adapts accurately.

Summary of Steps: Applying the Self Healing Feature in TOSCA

StepDescription
1Scan web application using Tosca
2Create and execute test case
3Simulate UI change (change web element label)
4Re-run test case (expect failure)
5Rescan modified control and enable Self-Healing
6Save updated control
7Add SelfHealing configuration parameter
8Add SelfHealingWeightThreshold TCP
9Run the updated test case
10Verify test passes with new control

Real-World Relevance of the Self Healing Feature in TOSCA

The Self Healing Feature in TOSCA is especially valuable in Agile and DevOps environments where continuous deployments are the norm. UI changes happen frequently, and manually updating every test script would drastically slow down testing velocity.

By adopting this feature, QA teams can:

  • Save time on test maintenance
  • Increase test coverage with less overhead
  • Reduce test flakiness and false negatives
  • Ensure higher confidence in release quality

This makes self-healing automation not just a luxury, but a necessity in modern test strategies.

Conclusion

The Self Healing Feature in TOSCA is more than just a convenience, it’s a critical capability that helps testers adapt to fast-changing applications without rewriting test scripts repeatedly. Whether you’re preparing for the Tricentis TOSCA Certification, following a TOSCA Automation Tutorial, or enrolled in a TOSCA Training Online program, mastering self-healing is a must-have skill.

Start using Self-Healing today to make your tests smarter and your testing workflow more efficient.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share this article
Enroll Free demo class
Enroll IT Courses

Need a Free Demo Class?
Join H2K Infosys IT Online Training
Subscribe
By pressing the Subscribe button, you confirm that you have read our Privacy Policy.

Join Free Demo Class

Let's have a chat