Selenium Certification Training
- 20k Enrolled Learners
- Live Class
Whenever new software is released, the need to test new functionality is obvious. However, it’s equally important to re-run old tests that the application previously passed. That way we can be sure that the new software does not re-introduce old defects or create new ones in the software. We call this type of testing as regression testing. Throughout this article, we will explore regression testing in detail. If you are new to software testing, be sure to also read the Beginners’ Guide for Software Testing.
Let’s take a look at topics covered in this article:
“Testing of a previously tested program following modification to ensure that defects have not been introduced or uncovered in unchanged areas of the software, as a result of the changes made is called Regression Testing.”
A regression test is a system-wide test whose main purpose is to ensure that a small change in one part of the system does not break existing functionality elsewhere in the system. If you consider regression as unintended change, then this type of testing is the process of hunting for those changes. In simple terms, it is all about making sure that old bugs don’t come back to haunt you. Let’s take a look at a fictitious example that illustrates the concept.
When adding a new payment type to a shopping website, re-run old tests to ensure that the new code hasn’t created new defects or re-introduced old ones. Regression testing is important because, without it, it’s quite possible to introduce intended fixes into a system that create more problems than they solve.
Conducting regression tests benefits companies in a number of ways such as:
Regression testing ensures the correctness of the software so that the best version of the product is released to the market. However, in the real world, designing and maintaining a near-infinite set of regression tests is just not feasible. So you should know when to apply regression testing.
It is recommended to perform regression testing on the occurrence of the following events:
Next part of this article is about different types of regression testing.
Regression testing is done through several phases of testing. It is for this reason, that there are several types of regression testing. Some of them are as follows:
Unit Testing: In unit testing when coding changes are made for a single unit, a tester, usually the developer responsible for the code – re-runs all previously-passed unit tests. In continuous development environments, automated unit tests are built into the code, making unit testing very efficient in comparison to other types of testing.
Progressive Testing: This type of testing works effectively when there are changes done in the software/application specifications as well as new test cases are designed.
Selective Testing: In selective testing testers use a subset of the current test cases to cut down the retesting cost and effort. A test unit must be rerun if and only if any of the program entities it covers have been changed.
Retest-All Testing: This type of testing strategy involves the testing of all aspects of a particular application as well as reusing all test cases even where the changes have not been made. It is time-consuming and is not much use when any small modification or change is done to the application.
Complete Testing: This testing is very useful when multiple changes have been done in the existing code. Performing this testing is highly valuable to identify unexpected bugs. Once this testing is completed, the final system can be made available to the user.
It is very important to know which type of testing suits your requirement. Next up, we will discuss how regression testing is implemented.
The procedure to implement regression testing is like the one you apply for any other testing process. Every time the software undergoes a change and a new release comes up, the developer carries out these steps as part of the testing process:
That’s how regression testing is incorporated into a typical software testing process. The image below clearly depicts how regression testing performed.
Whenever some changes are made to the source code, the program execution fails for obvious reasons. After the failure, the source code is debugged in order to identify the bugs in the program. Appropriate modifications are made. Then the appropriate test cases are selected from the already existing test suite which covers all the modified and affected parts of the source code. New test cases are added if required. In the end, testing is performed using the selected test cases. Now you might be wondering which test cases to select.
Effective Regression Tests can be done by selecting the following test cases:
With the regression testing process out of the way let’s check out various techniques.
Regression testing simply confirms that modified software hasn’t unintentionally changed and it is typically performed using any combination of the following techniques:
Retest-All: This method simply re-tests the entire software suite, from top to bottom. In many cases, the majority of these tests are performed by automated tools. Certain times automation is not necessary. This technique is expensive as it requires more time and resources when compared to the other techniques.
Test Selection: Instead of choosing all the test cases, this method allows the team to choose a set of tests that will approximate full testing of the test suite. The primary advantage of this practice is that it requires far less time and effort to perform. Usually done by developers who will typically have better insight into the nuances of test edge-cases and unexpected behaviors.
Test Case Prioritization: The goal of this technique is to prioritize a limited set of test cases by considering more potential test cases ahead of less important ones. Test cases which could impact both current and future builds of the software are chosen.
As useful as regression testing can be, it is not without its negative points. You need to understand the challenges that you might face when implementing it.
Despite these negative points, regression testing is very useful in the software testing process. With regression testing, companies can prevent projects from going over budget, keep their team on track, and, most importantly, prevent unexpected bugs from damaging their products. With this, we have reached the end of the blog. Hope the things that you have learned here today will help you as you head out on your software testing journey.
If you found this article relevant, check out the live-online Selenium Certification Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe.
Got a question for us? Please mention it in the comments section of this ‘What is Regression Testing?’ article and we will get back to you.