Regression Testing is defined as a type of software testing to confirm that a recent program or code change has not adversely affected existing features.
Regression Testing is nothing but a full or partial selection of already executed test cases which are re-executed to ensure existing functionalities work fine.
This testing is done to make sure that new code changes should not have side effects on the existing functionalities. It ensures that the old code still works once the new code changes are done.
The need for Regression Testing
Regression Testing is required when there is a
- Change in requirements and code is modified according to the requirement
- A new feature is added to the software
- Defect fixing
- Performance issue fix
Regression Testing Techniques
Software maintenance is an activity which includes enhancements, error corrections, optimization and deletion of existing features. These modifications may cause the system to work incorrectly. Therefore, Regression Testing becomes necessary. Regression Testing can be carried out using the following techniques:
Retest All
This is one of the methods for regression testing in which all the tests in the existing test bucket or suite should be re-executed. This is very expensive as it requires huge time and resources.
Regression Test Selection
- Instead of re-executing the entire test suite, it is better to select part of the test suite to be run
- Test cases selected can be categorized as 1) Reusable Test Cases 2) Obsolete Test Cases.
- Re-usable Test cases can be used in succeeding regression cycles.
- Obsolete Test Cases can’t be used in succeeding cycles.
Prioritization of Test Cases
- Prioritize the test cases depending on business impact, critical & frequently used functionalities. Selection of test cases based on priority will greatly reduce the regression test
suite.
Selecting test cases for regression testing
It was found from industry data that a good number of the defects reported by customers were due to last minute bug fixes creating side effects and hence selecting the Test Case for regression testing is an art and not that easy. Effective Regression Tests can be done by selecting the following test cases –
- Test cases which have frequent defects
- Functionalities which are more visible to the users
- Test cases which verify core features of the product
- Test cases of Functionalities which has undergone more and recent changes
- All Integration Test Cases
- All Complex Test Cases
- Boundary value test cases
- A sample of Successful test cases
- A sample of Failure test cases
Regression Testing Tools
If your software undergoes frequent changes, regression testing costs will escalate.
In such cases, Manual execution of test cases increases test execution time as well as costs.
Automation of regression test cases is the smart choice in such cases.
The extent of automation depends on the number of test cases that remain re-usable for successive regression cycles. Following are the most important tools used for both functional and regression testing:
Selenium:
This is an open source tool used for automating web applications. Selenium can be used for browser-based regression testing.
Quick Test Professional (QTP):
HP Quick Test Professional is automated software designed to automate functional and regression test cases. It uses VBScript language for automation. It is a Data-driven, Keyword based tool.
Rational Functional Tester (RFT):
IBM’s rational functional tester is a Java tool used to automate the test cases of software applications. This is primarily used for automating regression test cases and it also integrates with Rational Test Manager.
Regression Testing and Configuration Management
Configuration Management during Regression Testing becomes imperative in Agile Environments where the code is being continuously modified. To ensure effective regression tests, observe the following:
- Code being regression tested should be under a configuration management tool
- No changes must be allowed to code, during the regression test phase. Regression test code must be kept immune to developer changes.
- The database used for regression testing must be isolated. No database changes must be allowed
Difference between Re-Testing and Regression Testing:
Retesting means testing the functionality or bug again to ensure the code is fixed. If it is not fixed, the Defect needs to be re-opened. If fixed, the Defect is closed.
Regression testing means testing your software application when it undergoes a code change to ensure that the new code has not affected other parts of the software.
Re-testing Vs Regression Testing
What is Re-testing?
Re-testing is a type of testing performed to check the test cases that were unsuccessful in the final execution are successfully pass after the defects are repaired.
What is Regression Testing?
Regression Testing is a type of software testing executed to check whether a code change has not unfavorably disturbed current features & functions of an Application.
Difference between Retesting and Regression Testing
Regression Testing |
Re-testing |
Regression testing is carried out to confirm whether a recent program or code change has not adversely affected existing features | Re-testing is carried out to confirm the test cases that failed in the final execution are passing after the defects are fixed |
The purpose of regression testing is that new code changes should not have any side effects to existing functionalities | Re-testing is done on the basis of the defect fixes |
Defect verification is not part of regression testing | Defect verification is the part of re-testing |
Based on the project and availability of resources, regression testing can be carried out parallel with Re-testing | Priority of re-testing is higher than regression testing, so it is carried out before regression testing |
You can do automation for regression testing, Manual Testing could be expensive and time-consuming | You cannot automate the test cases for Retesting |
Regression testing is known as a generic testing | Re-testing is a planned testing |
Regression testing is done for passed test cases | Retesting is done only for failed test cases |
Regression testing checks for unexpected side-effects | Re-testing makes sure that the original fault has been corrected |
Regression testing is only done when there is any modification or changes become mandatory in an existing project | Re-testing executes a Defect with the same data and the same environment with different inputs with a new build |
Test cases for regression testing can be obtained from the functional specification, user tutorials and manuals, and Defect reports in regards to corrected problems | Test cases for retesting cannot be obtained before start testing. |
Challenges in Regression Testing:
Following are the major testing problems for doing regression testing:
- With successive regression runs, test suites become fairly large. Due to time and budget constraints, the entire regression test suite cannot be executed
- Minimizing test suite while achieving maximum Test coverage remains a challenge
- Determination of frequency of Regression Tests, i.e., after every modification or every build update or after a bunch of bug fixes, is a challenge.