Self Healing Test Automation Best Practices

Self Healing Automation Next Big theme for Automation after Selenium Success

At Next Generation Automation, Team always look forward next 5 years to understand where demand is coming for Automation and Self healing test automation is one such area which stands strong compare to other themes.

Today when Next Generation Automation team talk to clients having outsourcing business more than 10 Million + USD, every client says my automation stack very good but when my development team release more complex features automation stands weak and resulting huge effort of my QAs in maintaining the automation stack and in some scenarios I found test scripts no longer applicable as entire business work flow gets changed due to complex business environment where we need to operate to satisfy our customer demands.

And Recently when Next Generation Automation Team present deck how Self healing automation can be solution for client complex testing needs, every client got excited and agreed to start POC by Next Generation Automation Academy experts.

In this article, We like to share some of best practices that can be used for Self healing Automation and help testing vendors to chase new area of automation where still lot of potential available for growth in next 5 years.

Lets start first understand what is Self Heal Automation?

We start with real life Scenario and take an example of human body created by almighty God. As soon any human get injured, self healing mechanism automatically gets trigger and start working to heal wounds. Depending on intensity of wounds, this healing may take some time longer than anticipated and medical procedure also plays important role in healing quickly than natural process of heal. If human body don't have feature of self healing, it will be very difficult for human body to recover from any accidents or diseases.

Same way today's automation also needs self healing. Most of automation frameworks which exist currently in market more towards building some what similar to human body as analogy but very few frameworks enable recovery scenarios in form of healing that determine what needs to be done if there is significant change in application flows. And all this makes scripts start failing though application functional right.

When we introduce self healing mechanism in automation stack, scripts adapt as per change in business work flows. And this result in less maintenance effort by QA and also more stable test execution and also helps discover more application defects.

3 Principles to know before you apply Self Healing Automation in your projects:

Get to know your application.

This is the most important principle. It's easy to dive in and start automating self-healing mechanisms, but you'll waste time if you don't understand the production problems your application is having before you begin. First, set up automated alerts to see which error scenarios are most common.

Prevention is better than cure.

Sure, it's nice to be able to recover from error test scenarios automatically, but it's better to prevent the error test scenarios wherever possible. Take a holistic look at test problems you detect so that you can identify and fix the root causes where possible. This can be done with more test reviews, fixing test scripts maximum for any changes in application.

Happier Automation Teams

A primary goal of self-healing systems should be happier automation teams. Self-healing systems bring not only benefits to developers and operations. But an often-overlooked benefit is that an test script that fixes itself reduces the support burden on the automation team. Less rote and menial work means happier automation engineers.

How to pattern your self-healing test automation

1. Error handling

The first pattern to look at is error handling. The idea is simple enough: spot an error and adjust how the system responds accordingly.