In this Blog, we will cover Regression Testing, its need, importance, techniques available to perform Regression and how it differs from Retesting. This type of testing ensures that little changes do not break software and the testers performing regression need to know what they are looking for and this guide explains how.
So, let’s begin…
What is Regression Testing?
Regression Testing is defined as a type of software testing performed to confirm that a recent program or code change has not adversely affected existing features.
- It is performed by re-executing a full or partial selection of already executed test cases to ensure existing functionalities are working fine.
- This testing is done to make sure that the changes in the code have no side effects on the existing functionalities. It is done to ensure about whether the old code is still working fine, once the new code changes are done.
Need For Regression Testing
It is necessary to perform Regression Testing when there is a:
- Change in code and requirements should be modified as per the requirement
- Any new feature is added to the software
- Any defect is fixed
- Performance issue fix
Approaches/Techniques used for Regression Testing
There are various regression testing techniques:
- Retest all
- Regression Test Selection
- Test Case Prioritization
a) Retest All
- This strategy is very slow and time-consuming because here a complete set of same test cases are executed again which results in the execution of unnecessary test cases.
- For any small change or modification is done to the application then this strategy is not useful.
- This is very expensive as it requires a lot of time and resources.
b) Regression Test Selection
- It’s better to divide test suite instead of re-executing the entire test suite.
- Test suite can be categorized as-
- In succeeding regression cycles, re-usable test cases can be used.
- Obsolete Test Cases can’t be used in succeeding cycles.
c) Prioritization of Test Cases
- Prioritizing the test cases as per the business impact, critical & frequently used functionalities.
- Test case selection based on priority will reduce the regression test suite and efforts for testing.
Test Case Selection For Regression Testing
Effective Regression Tests can be done by selecting 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 those functionalities which have recent changes
- Entire Integration Test Cases and Complex Test Cases
- Boundary value test cases
- Sample of Successful test cases and Failure test cases
Regression Testing Tools
If a software undergoes frequent changes, costs will increase for regression testing. In such scenarios, manual execution time, as well as costs of test cases, will be increased. Therefore, Automating the regression test cases is a smart choice in such cases.
Following are most important tools used for both functional and regression testing:
Selenium: This is an open-source tool used for automating web applications. Selenium is generally used for browser-based regression testing.
Quick Test Professional (QTP): The term HP Quick Test Professional is regarded as an automated software used basically for automating functional and regression test cases. VBScript language for automation is used by this tool also it is a Data-driven and Keyword-based tool.
Rational Functional Tester (RFT): It is a tool used to automate the test cases of application. Rational functional tester (by IBM) is mostly used for automating regression test cases.
How do we go about Regression Testing?
A sequence of steps is given below in order to understand how exactly we can go about Regression testing:
1. Smoke/Sanity Test
Initially, it is performed to check the stability of the system i.e., to confirm that the system works as desired under ‘normal’ conditions. The purpose here is to ensure that the system is stable even before the rest of the testing process is initiated.
Requirements for the modifications or additions of code must be thoroughly analyzed. Sometimes users report bugs that are found to be a result of last-minute alterations. Mandatory requirements of the customers must hence be carefully assessed, and test cases for regression are prepared such that the core features of the product remain firmly intact.
3. Test Cases for Critical Functions
The test cases designed for regression testing for the customer and development teams are the Sanity test cases to check the fundamental usefulness of the framework. Setup related test cases are then checked on priority. As the software lifecycle progresses, the test cases that are designed for regression testing are executed as per bandwidth and need.
Integration test cases are highly important and a series of regression test cases are performed while performing integration testing. A bug fix at the last moment can break the integration between multiple modules, even in an already tested application.
4. Selection of Test Cases
After the test cases are prioritized, they can be selected for execution. The selection of these test cases is done on the basis of the area that has frequent defects and based on the features and their criticality. Tests are performed for those units of code that have undergone multiple changes repeatedly.
Difference between Regression Testing and Re-testing
|1||Regression Testing is performed to confirm whether a recent code change has not affected existing features||Re-testing is performed to confirm the test cases that failed in the final execution are passing after the defects are fixed|
|2||Its purpose is that the new code changes do not have any side effects on the existing functionalities||Re-testing is done to verify the logged Defect is fixed.|
|3||Verification of the defect is not a part of Regression Testing||Defect verification is the re-testing.|
|4||Regression Testing can be performed parallel with Re-testing as per the project and availability of resources.||Re-testing is performed before regression testing as it is important to verify the logged defect is fixed or not then we move on to Regression Testing.|
|5||Regression test cases can be automated.||You cannot automate the test cases for Retesting|
|6||It is also known as a generic testing||It is a planned testing|
|7||It is done for passed and failed test cases||It is done only for failed test cases|
|8||Regression testing verifies unexpected side-effects||Re-testing assures that the original defect has been corrected|
|9||It is only done when there is any modification or changes become mandatory in existing project||It executes a defect with same data and the same environment with different inputs with new build|
In the end, an effective regression strategy can save time and money both. As per one of the case study in banking domain, regression saves up to 60% time in bug fixes (which would have been caught by regression tests) and 40% in the money. So, I am sure your decision lies in the same perspective as mine and that is REGRESSION TESTING!