In software development, it is important to run tests after a defect is fixed. Such testing is usually two-fold. First, confirmation testing is done to ensure that code has successfully been fixed. Next comes regression testing, which shows developers that the new code they developed hasn’t negatively affected existing functionalities. Over time, teams develop regression packs including numerous test cases that can be run when new versions of an application are released. It is important for stakeholders to understand what regression testing is and how it improves the development process.
In general, regression testing makes sure that previously developed software continues to perform correctly after it has been changed. Such changes could involve enhancements, patches, configuration changes, bug fixes and more. Regression testing is a key part of the software development process because it allows for extensive, repeated and automated testing of the entire software package. Regression tests can be put into two broad categories: functional and unit tests. Functional tests run the complete program with various inputs, while unit tests focus on individual functions or subroutines. Usually, regression testing tools are third-party products rather than being part of the compiler suite.
Why Regression Testing Matters
Experienced developers know that it is quite common for new bugs and other problems to arise as software is fixed. Sometimes re-emergence might even occur if a fix is lost. And in some cases, a fix in one area can introduce a bug in another. Mistakes can happen as well, and when the same coders are working on the project throughout, sometimes they happen more than once. This is why regression testing is vital to software quality. It is important to note that regression testing can be done to track output quality as well as correctness.
Automating Regression Testing
During the testing process, developers will record a test that exposes a bug and then re-run it regularly after changes are made to the code. While it is possible to do this through manual testing, it is generally agreed that automated regression testing is best practice. This is in part because running the same tests multiple times, with the same conditions and variables in place, does not yield new defects. Another reason why automation is preferable is that more test cases can be included in regression packs in a timely fashion.
An automated testing suite contains software tools that allow for executing all test cases automatically. Some tools automatically re-run regression tests at specified intervals as well. These tools report failures and keep track of the process for future reference. Teams might choose to run a regression test system after each successful compile for smaller projects, nightly or once a week.
Teams can group test cases together into categories (sanity tests, core product tests and supporting functionality tests) and set up a testing schedule to identify problems with code in a regulated way. Doing so involves running sanity tests first, then core product tests, with supporting functionality tests coming last in the process.
Examples of Regression Testing Tools
The following are good options when it comes to selecting tools for regression testing. These third party products can make the automation process easier.
- Rational Functional Tester: This product is a tool from the Rational Software division of IBM. It allows users to create tests that mimic the actions and assessments of a human tester.
- Selenium: This tool provides a tool for authoring tests without learning a test scripting language. It uses a domain-specific language to write tests in a number of popular programming languages.
- Watir: This product is an open-source family of Ruby libraries for automation. It allows the user to write tests in a flexible, easy-to-maintain format.
These best practices will help you create a maintainable, useful regression pack. Keep in mind that, when picking a tool, it is important to check how easily you can add or update test cases.