The Relevance of Self-Maintaining Tests

Testsigma Inc.
3 min readMay 18, 2019

--

The maintenance of functional Test Cases for a product under active Development is a redundant process.

It is common for the developer to change the attributes(id, class, name e.t.c) of an element on a Web page during the development. When that happens, the existing automated test scripts also need to be changed. This may sound simple, but if there are many such changes in the application or if there are a lot of Test Cases to be modified, this takes a lot of time and effort for the testers to modify tests and re-run them.

After a number of iterations of fixing the tests for recent changes in UI and test runs, when all of those Test Cases are automated for the current build and you get a spotless green in your Test Results, it is indeed, a big relief. However, soon the next build will be released and at least one of the tests will fail. This repeats for every sprint/release.

Test Automation solutions such as Testsigma are trying to cut down on thetest script maintenance with its AI-driven Test Maintenance strategy. The AI detects changes in the new Web page and automatically modifies the tests without user intervention. Self-Healing in Testsigma is done with the help of AI algorithms that automatically detect the changes made to the source code and alters the Test to prevent them from failing.

Let us look at an example.

Use Case

So, let’s assume we have a Test Case for the Signup page and the first step in it is to enter a given name, say ‘John Smith’ in the Full name field. The HTML code for the field is as shown below:

<label>Full name</label><input title="fullname" id="Username" type="text" name="name" placeholder="name">

As shown in the below image, the id of the element is ‘Username’ at the beginning. The test passes here(green check). Let’s assume that the developer shortens the id of the element to ‘Userid’. This changes the UI Identifier. The change in UI Identifier causes the test to fail since we were using the old id to locate the field.

This is what happens in the case of conventional testing frameworks or tools. The tester has to make changes in the UI Identifiers every time there’s a change and, it becomes an extra effort to maintain these changing UI identifiers/attributes.

With Testsigma’s Self-Healing(Auto Test Maintenance) functionality, the UI Identifier in the Test Case is automatically corrected when the developer changes the ID attribute.

As shown in the below image, the test passes even after the change in ‘id’:

AI-driven Test maintenance

Despite the change in the attribute, the test “heals” itself to the changes made in the source code. Tests without Self-Healing will fail in such cases.

Self-Healing saves the tester’s time and effort by identifying changes automatically and updating the test cases for small changes made in the UI. So, for Agile development teams, Self-Healing is a very handy feature to have and saves time and money.

Try Testsigma. Check out how Testsigma identifies changing attributes and maintain the tests!

--

--

Testsigma Inc.
Testsigma Inc.

Written by Testsigma Inc.

Testsigma is a completely cloud-based codeless test automation tool that lets you create stable and reliable tests for web, mobile & APIs — all from one place.

Responses (1)