Regression testing is a testing process that is applied after a program is modified. It involves testing the modified program with test cases in order to reestablish our confidence that the program will perform according to the (possibly modified) specification.
In the development phase, regression testing may begin after the detection and correction of errors in a tested program. Regression testing is a major component in the maintenance phase where the software system may be corrected, adapted to new environment, or enhanced to improve its performance. Modifying a program involves creating new logic to correct an error or to implement a change, and incorporating that logic into an existing program. The new logic may involve minor modifications such as adding, deleting, or rewriting a few lines of code, or it may involve major modifications such as adding, deleting, or replacing one or more modules or subsystems. Regression testing aims to check the correctness of the new logic, to ensure the continuous working of the unmodified portions of a program, and to validate that the modified program as a whole functions correctly.
Many modifications may occur during the maintenance phase where the software system is corrected, updated, and fine‐tuned. Software maintenance is defined as the performance of those activities required to keep a software system operational and responsive after it is accepted and placed into production (FIPS, 1984). There are three types of modifications, each arising from different types of maintenance.
Corrective maintenance
, commonly called “fixes,” involves correcting software failures, performance failures, and implementation failures in order to keep the system working properly. Adapting the system in response to changing data requirements or processing environments constitutes
adaptive maintenance
.
Perfective maintenance
covers any enhancements to the system, where the objective may be to provide additional functionality, increased processing efficiency, or improved maintainability.
During adaptive or perfective maintenance, new modules are usually introduced. The specification of the system is modified to reflect the required improvement or adaptation. However, in corrective maintenance, the specification is not likely to be changed, and no new modules are likely to be introduced. Most modifications involve adding, deleting, and modifying instructions. Many program modifications occurring during the development phase are similar to that of corrective maintenance, because the specification will not normally be modified due to a discovery of an error in the program.