Agile projects allow you to deliver new features faster, and more effectively. But how do you ensure the quality and reliability of those features? How can you make your testing Agile as well? Here, we give you some tips on how to implement agile test automation.
Why do we need agile testing?
The Agile methodology is about rapidly delivering incremental improvements to your product. The aim is to deliver better products that meet the requirements of the end user. This is achieved through approaches such as Scrum or XP. These split development into small, limited sprints. At the start of each sprint you prioritize which features or fixes will be worked on. At the end, you review progress and check if you have delivered what the user needs.
The result is a large number of small incremental product releases. These need to be tested for quality and stability. In the olden days, all that testing happened once you had completed development. But nowadays we see constant specification changes during the development. As a result, the QA team is faced with testing against a constantly shifting target. So, Agile requires testing to be done continuously throughout development. In other words, you need your testing to be Agile as well.
What are the problems with agile testing?
Agile testing implies being able to test your whole product on a similar time scale to your development sprints. For most products, that is only feasible if you use test automation. Here, you get a computer to interact with your UI and replicate the actions of a real user. Typically, this means you will be relying on 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. Worse, the longer you rely on it, the bigger your test debt will become.
Writing a new test script takes hours or even days. This is because each script has to be hand-crafted, tested, and debugged. Adding cross-browser and cross-platform support makes this process even slower. This quickly becomes a blocker for testing new features, especially if multiple features are added in each sprint.
Selenium scripts are notoriously fragile because they rely on CSS selectors which 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 selects 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.
Over time, your team will start to suffer from a growing test debt. They only have a finite capacity for work. This has to be split between creating new tests, maintaining existing ones, and analyzing results. But test maintenance increases with every single new release. Eventually, the team won’t be able to complete all the work they need to do. This ever increasing backlog of overdue test maintenance is known as test debt and it’s extremely debilitating.
The impact of test debt on agile testing
Agile testing requires your test team to follow an Agile approach, breaking down their work according to the development team’s sprints. Planning for each sprint requires prioritizing between automating new features vs maintaining existing scripts vs running things manually. But test debt means something has to give. This means your team ends up making tough decisions simply to meet short term sprint and release goals.
Turning to agile test automation
So, what is the solution? Simple, you need to adopt agile test automation! You just need to solve the problems with slow test creation and endless test maintenance…
Fortunately, that’s easier than it sounds thanks to AI-powered test automation. And at Functionize, we have done just that.
Speed up test creation
Tests are slow to create because they are software development projects in their own right. The typical test creation workflow goes something like this.
- Take a user journey and 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, debug, and solve any cross browser or cross-platform issues.
- Finally, you can add it to your test suite.
Our approach is much simpler thanks to machine learning and computer vision. Architect is our smart test recorder. To create a test, you step through the test plan on the system under test. In the backend, our platform is recording huge amounts of data about your application. This allows it to understand both the intent of your test and how the application works. Architect includes advanced features, such as dynamic test data, 2 factor authentication tests, or visual testing of the UI.
Slash test maintenance
Unlike Selenium, our platform relies on Smart Element Recognition. Each time you interact with some element during test creation, the system records thousands of pieces of data. These allow it to uniquely recognize every element, even if the element changes in some way. For instance, it will realize that an “Add to cart” and “Buy” button are the same, so the test passes rather than failing unnecessarily. If an address form is changed to combine street and house number, it will understand what happened. If a restyle moves the checkout button from the top left to the centre of the page, no problem. Effectively, it’s applying the same intelligence a human user would when seeing an updated UI. As a result, you almost eliminate routine test maintenance.
Eliminate test debt
Overall, teams switching to Functionize cut test maintenance over 80% and speed up test creation tenfold. This will free up their time to focus on creating more tests, analyzing test results, and improving overall quality. In other words, they will be able to focus on improving your application, rather than maintaining their tests. The upshot is that Functionize allows you to eliminate test debt.
How to implement agile test automation
Moving to agile test automation requires the right test solution (Functionize) and a clear methodology. The steps are pretty simple:
- Every time you create a new feature, you need to write a new test for it. Architect makes this incredibly simple, even if you need to add advanced features. So, no more delays in automating new tests.
- Whenever new code is pushed, use orchestrations to run through your smoke tests and make sure nothing major has broken. Meanwhile, you can be running background tests constantly. Since tests self-heal, they can run without supervision. There’s also fewer false positives, which means that failures are real bugs.
- Each 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. This lets you create a test once and run it across multiple browsers and geographies, allowing you to complete testing faster.
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. To find out more, book a demo today.