How To Implement Agile Test Automation

Agile test automation is an essential requirement for truly agile delivery of large projects. Here we give some tips on how to implement it properly.

October 27, 2019
Tamas Cser

Elevate Your Testing Career to a New Level with a Free, Self-Paced Functionize Intelligent Certification

Learn more
Agile test automation is an essential requirement for truly agile delivery of large projects. Here we give some tips on how to implement it properly.
Agile test automation is an essential requirement for truly agile delivery of large projects. Here we give some tips on how to implement it properly.

Agile test automation is one of the main requirements for true agile delivery of software. On the whole, QA is the least agile part of the SDLC. This is because QA is tasked with rigorously testing that the product is stable and meets the specification. Agile delivery means both the product and specification change frequently during the development. As a result, the QA team is faced with testing against a constantly shifting target. The solution is to turn to test automation to help. More specifically, you need to implement agile test automation.

What is agile test automation

Test automation is well understood. Essentially, you task a computer to interact with your UI and replicate the actions of a real user. Typically, this means you will be using Selenium to create test scripts. Each of these scripts covers a required user journey or tests for a known bug.  The problem is, Selenium test scripts are not very agile.

Test creation

Writing a new test script takes hours or even days. This is because each script has to be hand-crafted, tested, and debugged. If you need to add cross-browser and cross-platform support, this makes it even harder. This can become something of a blocker for testing if many new features are being added at the same time. Test scripts also rely on CSS selectors to choose the correct element on the page. So, test engineers have to be incredibly careful to avoid using selectors that appear more than once on the page.

Test maintenance

Selenium scripts are notoriously fragile because they rely on CSS selectors which can change unpredictably whenever the UI is updated. The system uses these selectors to choose the correct UI element to interact with. If a selector changes, either the script immediately breaks or it chooses the wrong thing and fails many steps later. The upshot is, each time you change the UI you need to update all your test scripts

Agile test automation

So, what is the solution? How can you implement agile test automation? Well, it’s quite simple. You just need to solve the problems with slow test creation and endless test maintenance! Here at Functionize, we have done just that.

Faster test creation

The typical test creation workflow goes something like this. Take a user journey. Pass it through a test management system to create a test plan. Hand the test plan to a test automation engineer to create the script. Test the script and then add it to your test suite. Our approach is much simpler. We use AI to cut or reduce all these steps. To start with, you pass a set of plain English test plans or user journeys to our NLP engine. it uses a combination of natural language processing, machine learning, and computer vision to create a functional test. It works by learning how your UI actually functions, using the test plans as guidance for its modeling. Once it has learned the UI, it generates the actual tests.

No more test maintenance

The brains of our system is our ML engine. It combines multiple forms of AI using boosting and other techniques to build a detailed model of every element in your UI. Each element gets a unique fingerprint. This combines traditional CSS selectors and XPATHs with multiple other aspects including:

Visual configuration – where is the element on the page, is it hidden, etc. 

API calls and server response – what action does the element relate to (especially important for buttons). 

NLP – what does button text actually say and mean, e.g. understanding that “Buy now” and “Add to basket” are the same. 

The upshot is, Functionize tests can self-heal.  ML engine copes seamlessly with UI changes that would break a Selenium test script. ML engine even copes with extreme changes like moving a button on the page, changing the button text, and restyling it.

How to implement agile test automation

So, Functionize gives you an ideal system for agile test automation. But how do you actually implement it in practice? Fortunately, it’s pretty simple to do. You need to do three things:

  1. Every time you create a new feature, you need to write a new test for it.
  2. Make good use of test orchestrations to do thorough tests of new features and to check their impact on the existing code.
  3. Every time you have a release candidate, you need to run a complete set of regression tests. Fortunately, this is pretty simple and fast thanks to the Functionize Test Cloud.

So, as you see, it’s hardly rocket science. But agile test automation can transform your software delivery, speeding up releases and improving the overall quality of your product.