Regression Testing for Developers
What is Regression Testing?
Regression testing is the process of continually testing all features of a product. This includes both new and old product features. Regression testing on older features is often less intensive than testing of new features. With new features, testers need to make sure everything works appropriately in every case. With older features, testers just have to ensure that it isn’t broken. This is often done by evaluating a smaller set of actions to make this process more efficient. If a few parts of a feature work as they did before, the rest of the parts probably do as well.
Benefits of Regression Testing
Regression testing has a number of benefits when applied properly. One of the biggest benefits is automation. Testing of new features often requires an actual tester driving the process. Regression testing, however, can be run via automated programs or scripts. A subset of tasks can be programmed to run regularly, frequently once per day or once per week. If these automated tests encounter the results they expect, everything is assumed to be working properly. If any of the tests fail, a tester can manually investigate to see what has changed. Changes are sometimes intentional, and the test can be updated accordingly. Other times, changes reflect an actual failure. In this case, testers can alert developers, and have them fix what was broken with new programming changes.
Another great benefit of regression testing is continuity of business. This refers to the idea that customers using software can continue using it without a break. By testing old features regularly, an organization can catch issues before they are released to customers.
A less obvious benefit of regression testing is the reduction of potential problems with old code. Instead of letting problems go unchecked for weeks or months until customers report them, regression testing points out flaws in features immediately. If regression testing didn’t catch these errors so quickly, the developers may build on broken code. As more new features are added, it becomes more and more complicated to change the flawed foundation. Regression testing ensures that these problems are solved quickly, and not allowed to grow into bigger issues.
Regression Testing in Agile
Regression testing is valuable in any software development, but it also has specific benefits to Agile software development. In particular, continuity of business is vital to stakeholders. Where traditional development has slow and infrequent software updates, Scrum teams can potentially send out new software every few weeks or even weekly. In any sprint, a feature could be broken and be passed to the customers almost immediately. While special cases might be made, this typically means that customers are stuck with broken code until the next sprint release. By running regression tests quickly and often, problems are caught before they reach stakeholders.
In addition to continuity of business, Agile teams benefit from minimizing problems with old code. When old features are broken, they generate technical debt. This technical debt reduces the overall development pace of the Scrum team. Slowed development pace means the Scrum team can produce fewer features per sprint, and may even fail to meet the goals of the sprint. Technical debt is not something that can be delayed at the expense of later sprints. It must be handled as it is encountered. Regression testing makes these problems less likely to happen at all. When they do happen, they give immediate notice so that developers can handle the problems quickly.
Where traditional development is ongoing for long stretches, Agile development is broken into sprints. These sprints serve as fantastic stopping points to analyze regression testing. After each sprint, the Scrum team can create new regression testing automation for the new features. This puts the Scrum team into the next sprint with a clean slate. As each sprint is completed, all of the developed features (new and old) are handled by the regression tests.
Our Favourite Agile Books
We found these books great for finding out more information on Agile Scrum: