{"id":28553,"date":"2025-07-18T09:18:53","date_gmt":"2025-07-18T13:18:53","guid":{"rendered":"https:\/\/www.h2kinfosys.com\/blog\/?p=28553"},"modified":"2025-07-18T09:18:56","modified_gmt":"2025-07-18T13:18:56","slug":"a-simple-guide-to-the-self-healing-feature-in-tosca","status":"publish","type":"post","link":"https:\/\/www.h2kinfosys.com\/blog\/a-simple-guide-to-the-self-healing-feature-in-tosca\/","title":{"rendered":"A Simple Guide to the Self Healing Feature in TOSCA"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p>If you\u2019re 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 <a href=\"https:\/\/www.h2kinfosys.com\/courses\/tosca-automation-tool-training-and-certification-program\/\">TOSCA Training Online<\/a> programs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Introduction to the Self Healing Feature in TOSCA<\/strong><\/h2>\n\n\n\n<p>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\u2019s label or ID can result in test failures.<\/p>\n\n\n\n<p>That\u2019s 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.<\/p>\n\n\n\n<p>Let\u2019s explore how this works with a hands-on walkthrough using Tricentis\u2019s<a href=\"https:\/\/demowebshop.tricentis.com\/\" rel=\"nofollow noopener\" target=\"_blank\"> Demo Web Shop<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Demo Application for Self Healing<\/strong><\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step-by-Step Guide to Apply Self-Healing in TOSCA<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Initial Scan and Test Case Execution<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 1: Scan the Web Application<\/strong><\/h4>\n\n\n\n<p>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.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 2: Create and Execute the Test Case<\/strong><\/h4>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Simulate a UI Change<\/strong><\/h3>\n\n\n\n<p>To demonstrate how the <strong>Self Healing Feature in TOSCA<\/strong> works, we\u2019ll simulate a common change.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 3: Modify the Label of a Web Element<\/strong><\/h4>\n\n\n\n<p>Use the browser&#8217;s Developer Tools (Inspect Element) to change the label of a target control, such as renaming the &#8220;Email&#8221; label to &#8220;Email ID&#8221;.<\/p>\n\n\n\n<p>This mimics what happens when a developer updates UI text in a production environment without changing underlying IDs or attributes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Re-Execute the Test Case<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 4: Run the Test Case Again<\/strong><\/h4>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Apply the Self-Healing Feature in TOSCA<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 5: Rescan the Control<\/strong><\/h4>\n\n\n\n<p>Open the corresponding module in Tosca and rescan the control (e.g., the email input field).<\/p>\n\n\n\n<p>In the Rescan window, TOSCA will attempt to identify the control again. This time, click the Self-Healing icon.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.h2kinfosys.com\/courses\/tosca-automation-tool-training-and-certification-program\/\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Edit-Healing-Properties-1024x576.png\" alt=\"Self Healing Feature in TOSCA\" class=\"wp-image-28565\" style=\"width:770px;height:auto\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Edit-Healing-Properties-1024x576.png 1024w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Edit-Healing-Properties-300x169.png 300w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Edit-Healing-Properties-768x432.png 768w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Edit-Healing-Properties.png 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>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.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 6: Save the Updated Control<\/strong><\/h4>\n\n\n\n<p>Once the Self-Healing operation is completed and the correct control is identified, save and close the Rescan window.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Configure Self-Healing in the Test Case<\/strong><\/h3>\n\n\n\n<p>Now that the control is re-identified, configure the test case to use the Self-Healing mechanism.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 7: Add the SelfHealing Configuration Parameter<\/strong><\/h4>\n\n\n\n<p>Open the test case in Tosca Commander and add a configuration parameter named SelfHealing. Set its value to one of the following options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Weighted<\/strong> \u2013 Uses a weighted algorithm to match the updated control.<br><\/li>\n\n\n\n<li><strong>Combination<\/strong> \u2013 Matches control using combined properties.<br><\/li>\n\n\n\n<li><strong>False<\/strong> \u2013 Turns off the Self-Healing feature.<br><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 8: Set the Weight Threshold (TCP)<\/strong><\/h4>\n\n\n\n<p>Add a Test Configuration Parameter (TCP) named SelfHealingWeightThreshold. This threshold defines how strict Tosca is in evaluating matches. The default value is 0.75.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.h2kinfosys.com\/courses\/tosca-automation-tool-training-and-certification-program\/\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Self-Healing-TCP-1-1024x576.png\" alt=\"Self Healing Feature in TOSCA\" class=\"wp-image-28564\" style=\"width:715px;height:auto\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Self-Healing-TCP-1-1024x576.png 1024w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Self-Healing-TCP-1-300x169.png 300w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Self-Healing-TCP-1-768x432.png 768w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2025\/07\/Self-Healing-TCP-1.png 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>Based on your system&#8217;s regional settings, this value should be entered as 0.75 or 0,75. Combinations scoring below the threshold will be ignored by Tosca&#8217;s algorithm during self-healing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Run the Updated Test Case<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 9: Confirm the Updated Web Element<\/strong><\/h4>\n\n\n\n<p>Ensure that your simulated UI still shows the updated label (e.g., \u201cEmail ID\u201d instead of \u201cEmail\u201d).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 10: Execute the Test Case<\/strong><\/h4>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>This shows how effective Self-Healing is in handling dynamic UI changes without requiring test rework.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Behind the Scenes: How Self-Healing Works<\/strong><\/h2>\n\n\n\n<p>When Tosca identifies a control during a test, it relies on specific properties (e.g., label, ID, CSS selector). If a property changes, Tosca\u2019s Self-Healing engine compares stored properties with current UI properties and calculates a match score.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>The Tricentis documentation explains that Tosca calculates a &#8220;weight&#8221; 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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Best Practices for Using the Self Healing Feature in TOSCA<\/strong><\/h2>\n\n\n\n<p>Here are a few recommended best practices to make the most of the Self Healing Feature in TOSCA:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Choose the Right Matching Strategy<\/strong><\/h3>\n\n\n\n<p>Understand when to use Weighted vs Combination mode. If your application has many similar controls, Combination provides more reliable identification by combining multiple properties.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Keep the Self-Healing Weight Threshold Balanced<\/strong><\/h3>\n\n\n\n<p>Avoid setting the threshold too low, which might lead to false-positive matches. A value around <strong>0.75<\/strong> is optimal in most cases.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Review Rescan Results<\/strong><\/h3>\n\n\n\n<p>Always validate Tosca\u2019s suggestions during the <strong>Rescan<\/strong> process. Don\u2019t rely solely on the automatic matching double-check critical test steps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Update Test Configuration Parameters (TCPs) Globally<\/strong><\/h3>\n\n\n\n<p>You can define SelfHealing and SelfHealingWeightThreshold as project-level TCPs so they apply across multiple test cases consistently.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Avoid Over-Reliance<\/strong><\/h3>\n\n\n\n<p>The Self Healing Feature in TOSCA is powerful, but it shouldn\u2019t replace robust test design. Continue to use best practices such as stable identifiers, modular test cases, and regular test maintenance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Test in Real Scenarios<\/strong><\/h3>\n\n\n\n<p>Test your self-healing configuration by making minor, controlled changes in your application\u2019s UI and ensuring Tosca adapts accurately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Summary of Steps: Applying the Self Healing Feature in TOSCA<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Step<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>1<\/td><td>Scan web application using Tosca<\/td><\/tr><tr><td>2<\/td><td>Create and execute test case<\/td><\/tr><tr><td>3<\/td><td>Simulate UI change (change web element label)<\/td><\/tr><tr><td>4<\/td><td>Re-run test case (expect failure)<\/td><\/tr><tr><td>5<\/td><td>Rescan modified control and enable Self-Healing<\/td><\/tr><tr><td>6<\/td><td>Save updated control<\/td><\/tr><tr><td>7<\/td><td>Add SelfHealing configuration parameter<\/td><\/tr><tr><td>8<\/td><td>Add SelfHealingWeightThreshold TCP<\/td><\/tr><tr><td>9<\/td><td>Run the updated test case<\/td><\/tr><tr><td>10<\/td><td>Verify test passes with new control<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Real-World Relevance of the Self Healing Feature in TOSCA<\/strong><\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>By adopting this feature, QA teams can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save time on test maintenance<br><\/li>\n\n\n\n<li>Increase test coverage with less overhead<br><\/li>\n\n\n\n<li>Reduce test flakiness and false negatives<br><\/li>\n\n\n\n<li>Ensure higher confidence in release quality<br><\/li>\n<\/ul>\n\n\n\n<p>This makes self-healing automation not just a luxury, but a necessity in modern test strategies.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>The Self Healing Feature in TOSCA is more than just a convenience, it&#8217;s a critical capability that helps testers adapt to fast-changing applications without rewriting test scripts repeatedly. Whether you&#8217;re preparing for the <a href=\"https:\/\/www.h2kinfosys.com\/courses\/tosca-automation-tool-training-and-certification-program\/\">Tricentis TOSCA Certification<\/a>, following a TOSCA Automation Tutorial, or enrolled in a TOSCA Training Online program, mastering self-healing is a must-have skill.<\/p>\n\n\n\n<p><strong>Start using Self-Healing today to make your tests smarter and your testing workflow more efficient.<\/strong><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":28569,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1994],"tags":[2004],"class_list":["post-28553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tosca-automation","tag-tosca-training"],"_links":{"self":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/28553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/comments?post=28553"}],"version-history":[{"count":0,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/28553\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media\/28569"}],"wp:attachment":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media?parent=28553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/categories?post=28553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/tags?post=28553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}