🌀Regression Testing
Regression testing can be performed on a new build when there is a significant change in the original functionality. It ensures that the code still works even when the changes are occurring.
Regression means Re-test those parts of the application, which are unchanged.
What is regression testing?
👩🏻💻 Regression testing involves re-running existing test cases after code changes to verify that previous functionality still works correctly. Regression testing is a black box testing techniques. It is used to authenticate a code change in the software does not impact the existing functionality of the product. Regression testing is making sure that the product works fine with new functionality, bug fixes, or any change in the existing feature.
Why is regression testing needed?
👩🏻💻 Any change to software - like defect fixes or new features - runs the risk of breaking existing functionality. Regression testing aims to detect these regressions before the software is released.
Types of regression testing
👩🏻💻 There are two main types:
✅ Regression (Fix) - Focused testing around recently fixed defects to verify those fixes
Done after defects are fixed by developers
Testers rerun test cases that cover:
The specific defect fix
Any potentially related functionality
Testers have a good understanding of:
The exact defect
Which tests cover that functionality
The aim is to verify the defect fix
Typically a focused, targeted set of test cases
Usually a shorter testing cycle
✅ Regression (Risk) - Broader testing based on impact and risk analysis to identify unintended side effects
Done on subsequent builds after code changes
Testers perform impact and risk analysis based on:
Number and types of code changes
Complexity of changes
Defect density in changed code
The aim is to identify any unintended consequences or regressions
The broader set of test cases selected to cover:
Functionality most at risk of being affected
High priority features
Typically a more comprehensive regression test suite
Aims for higher test coverage to catch side effects
Usually a longer testing cycle with more test cases
Regression as a fix 🐞 refers to when developers fix an existing issue that has caused the software to regress, or become worse than before. 📉 The goal is to bring functionality back up to where it was.
Regression as a risk 🚨 refers to the potential that new code changes could unintentionally introduce regressions, or bugs, that degrade existing functionality. 🤯
Regression as a fix deals with known issues, while regression as a risk deals with potential unknown issues. 💡
What is the regression testing process?
👩🏻💻 The process typically involves:
Reviewing code changes
Identifying test cases impacted based on location and type of changes
Prioritizing test cases based on risk and impact
Executing test cases on the new build
Logging any failures as new defects
Iteratively performing regression testing after each build
What are the benefits of regression testing?
👩🏻💻 The main benefits are:
👍 Ensuring existing functionality still works properly after changes
👍 Detecting software regressions before release
👍 Gaining confidence that changes have not disrupted the system
When can we perform Regression Testing?
We do regression testing whenever the production code is modified.
We can perform regression testing in the following scenario, these are:
1. When new functionality added to the application.
Example:
A website has a login functionality which allows users to log in only with Email. Now providing a new feature to do login using Facebook.
2. When there is a Change Requirement.
Example:
Remember password removed from the login page which is applicable previously.
3. When the defect fixed
Example:
Assume login button is not working in a login page and a tester reports a bug stating that the login button is broken. Once the bug fixed by developers, tester tests it to make sure Login Button is working as per the expected result. Simultaneously, tester tests other functionality which is related to the login button.
4. When there is a performance issue fix
Example:
Loading of a home page takes 5 seconds, reducing the load time to 2 seconds.
5. When there is an environment change
Example:
When we update the database from MySql to Oracle.
Advantages of Regression Testing
Regression Testing increases the product's quality.
It ensures that any bug fix or changes do not impact the existing functionality of the product.
Automation tools can be used for regression testing.
It makes sure the issues fixed do not occur again.
Disadvantages of Regression Testing
Regression Testing should be done for small changes in the code because even a slight change in the code can create issues in the existing functionality.
If in case automation is not used in the project for testing, it will time consuming and tedious task to execute the test again and again.
Retesting vs Regression Testing: Key Differences
Retesting has tests explicitly designed to check whether known bugs have been fixed.
Regression testing isn’t targeted testing for known defects.
Retesting does not focus on the previous version’s functionality. Instead, it aims to check whether functionality has been restored following a bug fix.
Regression testing is change-oriented and mainly aims to check whether the previous versions’ functionality is maintained following a change/update to the application.
Since retesting checks for a specific defect, it can’t be automated.
Automation is prevalent for regression testing. Manual testing every time a change or update is made to an application would be very irrational. Automation is far more complementary to carrying out blanket tests for unintended bugs.
Retesting doesn’t have to be a part of the testing process unless a bug is found and corrected; Therefore, retesting is not a guaranteed part of the testing process.
Regression testing is the norm and is always a part of the testing process. Every time the application’s code is altered, it is good practice to perform regression testing.
A higher priority is applied to retesting since this testing focuses on fixing known defects.
Regression testing has a lower priority than Retesting since it simply conducts a sweep of the application to check for potential unanticipated defects.
Since only a certain defect is explored in retesting it is far less time-consuming.
Regression testing often explores large parts of the application to uncover bugs and can be more time-consuming than retesting.
The core difference between Retesting and Regression Testing is that retesting is meant to check for known bugs and is used to reaffirm that the bug in question has been fixed generally.
Last updated