Before you go, check out these stories!

0
Hackernoon logoHow can Self-Healing AI Help a Web Test Automation Developer? by@danielmartin

How can Self-Healing AI Help a Web Test Automation Developer?

Author profile picture

@danielmartinDaniel Martin

Daniel Martin is Head of Customer Success in https://linkdoctor.io/ which is a link building agency.

I have been working in the automation field for more than a decade, and have seen automation tools evolve in unique ways. During the earlier years, when AI technologies weren’t prevalent, I remember how our automation team faced particular and unavoidable challenges which we, at that time, thought were some of the trickiest to resolve from our end. But we accepted it as just a part of daily life in the automation world and adapted to it. 

However, thanks to artificial Intelligence-powered automation tools, we now see all of these issues slowly being resolved and it seems like magic! I was particularly astonished and intrigued by self-healing AI, and this is what I will explore further in this article. Wondering why I call it magic? Let me elaborate.

Scenario 1

Assume you are an automation tester, and your team depends on a robust Regression automation test suite which has always run successfully in every release. As usual, you plan to schedule this automation test suite to run through the night, so that when you come in the next morning, all you will need to do is fetch the test results. You also plan to work on some new test case development the next morning.

Unfortunately, on the following day, you discover that the Automation tests had stopped running at midnight, midway through. After the test automation development team debugs the code manually, they figure out that the failure was just because the UI development team had changed the ID of that textbox, and hence the automation test suite failed to recognize it and eventually stopped. Well, we as automation developers have seen days like these for sure!

What had happened as an effect due to no mistake of the Automation developer? 

1.    Time lost by the automation developer in debugging the issue, which was not a programmed fault. It was just that the UI developer had made the change in the UI.

2.    Time lost by the automation developer who now needs to update the automation code, instead of working on other fruitful project tasks for the next day.

3.    Time lost by the automation tester to rerun the whole test Suite AFTER fixing the code, instead of working on other fruitful project tasks for the next day.

4.    Delayed test results because the Automation test code needs to be updated and rerun. The client would not have anticipated this delay.

What if I tell you now that self-healing AI can solve this issue? Magic! How? Well, the inbuilt Self-Healing AI technology that is embedded in many Automation tools available these days, can quickly “heal” the code by itself. In this case, the tool has a Smart Recorder. It finds a better path to locate the item whose attribute was updated by the UI developer during the test execution run, fixes the code itself, and then continues the running of the code without an error!

In the above scenario, if your automation tool had this smart feature, you would’ve discovered fully executed tests that next morning with information on changes made in the “healing period” for you to note. 

Doesn’t this experience seem like magic? Frankly, when I read about the self-healing AI technology, I found it hard to believe until I used it myself. I’m very sure you are already curious to know which tools support this feature! Tools that I can recommend for you to try areTestProject.io, Browsee.io, Test.ai etc.

Now let us move to another scenario.

Scenario 2

In some web applications, WebUI item attribute values are generated dynamically, such as Salesforce, SAP Web-based applications. For example, in these web applications, the ID of the textboxes changes per session!  This “every session new ID” scenario had been very challenging.

Self-healing AI comes to the rescue here as well!  In this case, it figures out by itself the new IDs associated with the UI widgets, heals itself, and continues running!

Wrapping it all together

AI embedded in any automation can help identify and fix problems more quickly than humans. The amazing fact is that it detects and resolves issues before they ever happen. In the background, it follows a predictive and preventive approach to problem-solving. The beauty of this fantastic feature is that it heals itself fairly quickly, and it improves itself by learning and relearning in every run!

Hence, the apparent advantages for the automation developer making use of self-healing AI are the following,

1. Time and effort saved due to automatic test debugging. The code finds the error itself and fixes itself without any human intervention. It is proactive. It avoids wasting manual effort time trying to find out the cause of the failure.

2. Time and effort saved due to automatic maintenance. An AI-powered technology like this is quicker in resolving the issue versus the time needed for a human to resolve the same issue.

3. Time saved in not requiring a rerun of the tests AFTER the code was updated. Here, the code fixes itself DURING the first run itself.

4. Timely spotting of bugs in the first run of the test automation, and eventual correction of bugs. 

5. It frees up time for the critical tasks for the automation development team and the Test Team.

6. Whenever the web application developers update the UI attributes, there is a cost reduction in maintenance as editing of the CSS and XPATH locators no longer needs to be done manually.

7. Provides wiser insights to changes in the application, which aid the developers and testers in diagnosing issues introduced in those application updates.

8. Self-Healing AI is also associated with an added technology which evolves every time you run the test. It learns and relearns automatically. So as your UI evolves with development, your tests evolve too. Your tests will adapt to UI changes automatically and stay up to date even after several successive UI changes. AI can evolve, improving itself regularly through machine learning. It uses those adjustments that were observed during the currently running process to predict what might happen next, and take appropriate actions.

9. Happy automation developers – Due to this magical feature, a lot of the significant challenges faced by an automation developer can be avoided; the above two scenarios that I’ve referenced in this article being the major issues! Seeing your test Suite failing, through no fault of your own, is not a cool feeling. Less repetition and tedious work due to such unpredictable maintenance work means happier automation engineers.

10. Happy customers – Due to the time saved by a self-healing code and automatic debugging, the client saves in lower costs associated with these activities. Also, the test results are delivered as planned, with timely reports on genuine bugs that will require additional attention.

Author profile picture

@danielmartinDaniel Martin

Read my stories

Daniel Martin is Head of Customer Success in https://linkdoctor.io/ which is a link building agency.

Tags

The Noonification banner

Subscribe to get your daily round-up of top tech stories!