Regression Testing

Regression Testing is a type of software testing which mainly focuses on testing the modified or updated parts of the source code of the application. In other words, testing the code changes or modifications made in the program to ensure that they won't impact the existing functionalities of the software or application. Whenever some new modules are added to the software or defects are fixed, testers perform regression testing to check the older modules should not be affected by them.

The objective of regression testing is to ensure that no new bugs or defects occur when there is a code change or a bug got fixed. It ensures that the old code or existing functionalities are untouched and working correctly, the same as before. In general, it is a testing of entire or some modules of the application which are already executed once to ensure that the application’s functionality is unchanged. It is usually performed on the passed test cases.

Regression testing can also be automated as several test cases are executed multiple times to achieve the standard quality of the application. Therefore, running a massive amount of test cases manually is a time-consuming and tedious task. Hence, there comes the need to automate regression test cases. It is also known as Verification Method.

Need for Regression Testing

Regression testing plays a crucial role in software testing as the final testing where the overall stability and functionality of the application have been tested is the responsibility of regression tests. It came into the picture when there was a need for requirements or code modifications in the system.

When a product is in the testing phase, it undergoes multiple types of testing to achieve the goal of a high-quality standard. Regression testing is the final testing before moving the product into production or user acceptance.

Below are the pointers on why regression testing is essential for an application:

  • To ensure that the modified code doesn’t impact the existing functionalities.
  • To validate the updated changes in the code are working or not.
  • Whenever a new requirement or feature is added, regression tests are performed to make sure other features and functionalities are unchanged and working accurately.
  • It is also required for defect fixing and performance fixing issues.

When to perform Regression Testing?

As we have discussed, regression testing is an essential part of the software testing life cycle. Regression tests can be performed in various scenarios. Some of them are mentioned below:

  • When a new feature or module is proposed by the client in the existing part – Suppose, on a login page, we can log in using Gmail or Mobile Number. A new feature has been introduced, i.e., logging in through Pinterest and Facebook. These two options are added to the login module.
  • When the client wants to modify some features or modules – Earlier on the login page, when we try to login with Gmail or Mobile Number, an OTP is sent on the respective option. When the other two options are introduced, the client wants to remove the OTP option, and a user can directly log in by using their Gmail, Facebook, Pinterest, and Mobile number.
  • When a defect is found and fixed – Suppose the login functionality is not working due to some broken code or functionality. Testers have logged a bug for the same, and it got fixed by the developers. Once the defect is fixed, testers need to perform regression tests to ensure the defect and corresponding features and functionalities are working as expected.
  • When the environment gets changed – Regression testing is done when the environment gets changed from one to another. For example, the testing or database environment is changed from redshift to MySQL.
  • When the performance issues are fixed in the application – Suppose there is a bank application and a user wants to download their statement. However, the application is taking high time to load the information. In such cases, regression tests are mandatory to perform.

Types of Regression Testing

Like other testing types, Regression testing is also divided into different categories, which are mentioned below:

  1. Unit Regression Testing
  2. Regional or Partial or Selective Regression Testing
  3. Full/ Complete Regression Testing
  4. Corrective Regression Testing
  5. Progressive Regression Testing

Unit Regression Testing – As per the name, Unit Regression Testing is more focused on testing the units and modules of the software. Both unit and regression testing are combined to make Unit Regression Testing. This type of regression testing is usually executed during Unit testing. The source code of the application is being tested with the help of regression test cases to ensure all the units and modules are accurately functioning without any discrepancies. All the interactions and dependencies on the unit to be tested will be blocked for testing the unit separately without any inconsistencies.

Regional or Partial Regression Testing – As per the name, Partial or Regional Regression Testing mainly focuses on testing the newly added and modified components or modules and the impacted regions. It is also called Selective Regression Testing. Sometimes, the client wants to add new features to the software. Therefore, when some new code is added to the existing code, partial regression testing is performed to ensure that the current code and functionality are working fine and remain untouched even after adding new lines of code and features. It also tests other regions and parts of the software impacted by the modifications. It is the most common and essential type of regression testing and time-saving testing activity.

Full or Complete Regression Testing – As the name says, Complete or, Full Regression Testing is mainly performed to test the entire software or system. In other words, it is commonly used for retesting the whole system or product from scratch. In this testing type, all scenarios and cases are tested again and consume a lot of time, effort, and money. It is also known as Retest-all Regression testing. It is very similar to User Acceptance testing, where we test the complete system to ensure the system and its functionalities are not compromised after adding new modules. It is performed after completing all other regression tests and before handling the system to the production unit.

While performing Regional Regression testing, we may miss some minor impacted areas, which can lead to significant failures or complexities in delivering the software. In such cases, Complete Regression testing is essential in quickly detecting hidden and unexpected issues to provide a quality product.

Corrective Regression Testing – In this regression testing type, the software is tested when there are no changes made to the software. In other words, Corrective Regression testing is performed on the software when the existing requirements and specifications are not modified and remain untouched. It is one of the most convenient and popular regression testing types. It also consumes less time in testing as the test cases are reusable and repetitive, requiring fewer efforts in testing the application.

Progressive Regression Testing – This type of Regression testing is somewhat similar to Regional Regression testing as it is performed when the requirements are modified or changed. However, the primary focus of Progressive Regression testing is testing the system when existing requirements are altered, and new test cases are designed based on the client's needs for creating an updated version of the system. While performing advanced regression testing, testers should keep in mind that the newly developed version or an updated version of the software should not affect the existing features of the software.

Regression Testing Techniques

Every software and application needs maintenance after some time. Maintenance of the software includes several activities such as optimizations, enhancements, addition and deletion of modules, error corrections, etc. Such modification can deviate the software or application from its actual functioning. Therefore, we need regression testing to supervise such changes. To perform regression testing correctly, we may require some testing methods and techniques.

In software testing, we have some popular testing techniques and approaches for performing regression testing effectively. It helps in successfully handling and executing regression tests to deliver a defect-free and standard quality product.

Below are the most commonly used regression testing techniques:

  • Regression Test Selection – In this approach, we examine and select some specific test cases which need to be re-tested. In other words, testers execute the selected test cases or selected parts of test suites which are categorized into two parts, i.e., reusable test cases (can be used in further cycles) and obsolete test cases (can't be used in other cycles). The test case selection is made based on the modifications done in the system.
  • Test Case Prioritization - In this approach, all the selected test cases are prioritized by the testers based on the criticality and business impact on the system. Higher priority test cases will be executed first, followed by the medium and low priority test cases.
  • Retest All – This approach is commonly used for retesting the entire system or product from scratch. In this testing approach, all scenarios and cases are tested again and consume a lot of time, effort, and money compared to other testing techniques, which is why this approach is costly.
  • Hybrid Testing technique – This approach combines Regression test selection and Test case prioritization testing techniques. Here, testers will firstly select the test cases for execution and prioritize them based on the risk, criticality, and business impact on the software.

How to conduct Regression Testing?

As discussed above, Regression testing is one of the essential types of software testing. With the help of regression testing, we can examine and test the product every time a new code or feature is added or the existing ones are modified. It is mainly required in the maintenance of the system, which includes code enhancements, error corrections, deletions of existing features, etc. Such modification may impact other functionalities and modules of the system. Regression testing comes into the picture to test each module or an entire system.

We don’t have a specific or fixed pattern for performing regression testing. However, some of the steps and techniques used for conducting testing are mentioned below:

  1. Selecting and gathering regression test cases
  2. Identifying test cases that can be automated
  3. Estimating the time and resources required for test execution
  4. Prioritizing test cases for execution
  5. Test case Execution

Step 1: Selecting and gathering regression test cases  

This is the first step in performing regression testing. In this step, testers will identify the tests and test cases for the newly added or modified modules. After identifying the testing areas or modules and tests to be performed, testers will gather the test cases for execution. Test cases will be divided into two categories, reusable test cases and newly created test cases. Previously used test cases or test cases that can be used in future cycles are referred to as reusable test cases, whereas, for newly added features, we have to document new test cases for regression testing.

Step 2: Identifying test cases that can be automated

The second step of the regression testing process is identifying test cases for automation. After selecting test cases in the first step, the tester will jump onto this step. Testers will thoroughly analyze all the test cases to identify cases that can be automated easily, which makes the testing process easy and saves the time and effort of the resources. Test cases are divided into two groups, manual test cases and automation test cases. Automating test execution will be much faster and more accurate than manual execution.

Step 3: Estimating time and resources required for test execution

The third step of the regression testing process is to analyze and identify the approximate time and resources required to perform testing. The estimation of execution time depends on several factors, such as test planning done by the QA team, test data creation, reviewing test cases, test execution, and reporting. Therefore, the testing manager or leads will discuss and define the overall approximate time and resources required for testing. However, development delays and bug fixes may increase the overall testing time.

Step 4: Prioritizing test cases for execution

After determining the estimated time for testing, testers will move to the next step, i.e., test case prioritization. In this step, all the test cases are assembled, and testers will prioritize them in the order of critical, high, medium, and low based on the software’s functionalities and risk factors associated with them. Based on the priority, testers will start executing high-priority cases, followed by medium and low-priority test cases. Prioritizing test cases will help in increasing productivity and reduces test execution time.

Below mentioned are the most common categories of test case priority:

  • Priority 0 (Critical) – It covers all critical test cases which are designed for the core functionalities of the software.
  • Priority 1 (High) – It covers all high-priority test cases which are not crucial as the priority 0 test cases. Priority 1 test cases are executed after completing the execution of priority 0 cases.
  • Priority 2 (Medium) – It covers all medium-priority test cases that are designed for essential features of the software. Such test cases do not create much impact on functionality compared to critical and high-priority cases. Therefore, priority 2 test cases are executed after priorities 0 and 1.
  • Priority 3 (Low) – It covers all low-priority test cases which make the most negligible impact on the application. Such test cases are related to minor features and functions of the product. Priority 3 test cases are executed at the end of the execution after priorities 0,1 and 2.

Step 5: Test case Execution

Test case execution is the last step of the regression testing process. After covering all the above steps, testers will move to the final and most crucial stage of the testing process. In this step, all the test cases will be executed one by one based on the test case's priority and urgency. Test case execution can be done in two ways based on the requirements, manually or with automation. If the team opts for automation for regression testing, automation tools such as Selenium, QTP, etc., are required. On the other hand, for manual execution, no such tools are needed.

The entire execution cycle keeps repeating until we achieve the goal of successful execution with all the reports documented.

Selection of test suite and cases for Regression Testing

Selecting test suites and cases for regression testing is an essential part of the regression testing process. As discussed above, selecting and gathering test cases is the first step in performing regression testing. The test suite is a container of test cases developed for testing the system. We know that regression testing mainly helps maintain the developed software and application. Therefore, we should thoroughly examine and select test cases for effective regression testing.

While selecting the test cases, one should remember that the regression test suite must be up-to-date according to new software versions/ builds, and obsolete test cases must be removed.

Following are a few steps for selecting the regression test cases:

  • Select test cases mapped to business requirements – Testers should always check and gather the cases related to business requirements specified by the client. No test case or testing area of the system should be left over for regression testing.
  • Select test cases which have frequently occurred bugs – Testers should keep a check on the areas or zones of the software where defects are frequently occurring. Such regions cannot handle a minor code modification which leads to the breakdown of that particular feature. Therefore, we should thoroughly examine that area as there are more chances of encountering other issues and bugs.
  • Select test cases for the functionalities more visible to the users – Testers should involve test cases of the visual features in their regression testing suite. Even though the visible part or any visible issue is of low severity, it has high priority as per the user. Therefore, testers must always select cases for all the visual features for the users.
  • Select test cases where code changes or functional changes have been made – This is the first and most important item of the regression testing suite. Testers should always select test cases for all the code and functional changes made by the developers to prevent any discrepancies. There will be a higher chance of issues in the modified areas compared to other areas and modules.
  • Select a bunch of all complex test cases – Testers should also involve complex test cases for the entire system to test the efficiency and performance of the system. In most cases, the system gets crashes or shows poor performance in executing complex test cases. Therefore, we should add and implement complex test cases to validate the system and prevents failure.
  • Select a bunch of all integration test cases – The tester should select integration test cases in the regression test suite for testing the integration between different modules. If an integration issue is present in the system, it will block the other integrated modules with the module having an issue. Therefore, to prevent integration issues on time, a bunch of integration test cases must be added to the test suite.
  • Select test cases of critical and high priority – To reduce testing efforts and time, testers should select the test cases based on the test case priority as per the client, i.e., first critical priority cases followed by high priority, medium priority, and low priority.
  • Select a sample of passed and failed test cases – To test the overall system, testers should select a combination of both passed and failed test cases of the previous build. Both previously failed and passed test cases should pass in the current build. Then only the regression testing will be marked as successful. Otherwise, if any one of them get failed, regression testing will be considered a failure.

Tools used for Regression Testing

There are multiple tools available in the market that are used for performing regression testing. As we all know, regression tests can be performed either manually or automatically. However, manual test execution requires a lot of time and increases the cost of testing. In such cases, we should always go with automation testing as it makes the process faster by providing a feature of reusability of test scripts and test cases within a short period.

Some of the most common and essential regression testing tools are mentioned below:

  • Avo Assure – It is an automation testing tool which offers more straightforward and faster regression testing with a 100% codeless solution. It is a tool with cross-platform compatibility, which helps us in testing various products on different platforms such as mobile, web, mainframe, desktop, emulators, etc. The main advantage of Avo Assure is that it can quickly achieve 90% test automation coverage while executing end-to-end regression tests.
  • Selenium - It is an open-source automation testing tool mainly used to test web applications. It is one of the most popular and commonly used testing tools, which is widely used for Functional and Regression testing. However, it also supports non-functional testing. The main feature of Selenium is that it is compatible with multiple programming languages such as Java, Python, C#, Ruby, PHP, etc., and automation testing frameworks. It can also be used with different operating systems such as Windows, Linux, and Mac and browsers like Google Chrome, Internet Explorer, Firefox, Opera, etc.
  • QTP/ UFT - UFT signifies Unified Functional Testing, which was formerly known as QTP (Quick Test Professional), is an automation testing tool designed and developed by Micro Focus systems. It is a licensed tool mainly designed for automating functional and regression tests. UFT is one of the leading cross-browser and cross-platform compatible tools. The main feature of UFT is that it brings developers and testers together to provide the best quality automation solutions.
  • Telerik Test Studio – It is one of the most straightforward and easy-to-use automation testing tools, which is also used for regression testing. The data-driven testing framework is mainly supported by Test Studio with various data sources. The testing team use this tool for designing, developing, and keeping track of the tests created for the application testing. It also supports various programming languages with a user-friendly interface for the application.
  • Watir – The complete form of Watir is Web Application Testing in Ruby, pronounced as Water. It is mainly used for testing web applications which consist of open-source libraries for Ruby language. It uses Ruby as a scripting language, and it can also be used for regression testing. Like other testing tools, Watir is compatible with multiple browsers and supports cross-platforms.
  • Katalon Studio It is an open-source automation testing tool mainly used for API testing and web, desktop, and mobile applications. It is one of the best automation tools available in the market, which is more popular and efficient than Selenium and Appium. It provides various features such as a user-friendly IDE, record and playback mode, manual and scripting methods for test design, object spy, object repository & browser plugin, etc. It is compatible with several other tools such as qTest, JIRA, Git, Kobiton, etc. It is versatile as it supports operating systems such as Mac, Windows, and Linux and also supports multiple web browsers for testing.
  • RFT - Like UFT, RFT is a licensed or commercial automation tool developed by IBM technologies. It is primarily designed for performing functional and regression tests, and it works on the concept of GUI and data-driven testing. It supports several development environments, including Java, SAP, Flex, Dojo, and others. RFT mainly supports two scripting languages that are Java and VB.Net. One of the unique features of RFT is StoryBoard testing, where the test scripts are recorded or captured in a sequence of screenshots of the actions and events performed on the application (AUT).
  • Subject7 - It is a cloud-based automation tool which is also a "True Codeless" solution for automation testing. It is a collaborative solution for all types of testing in a single platform which helps and empowers a technical or non-technical person to become an automation expert. It provides easy-to-use software for test authoring and reduces maintenance of the test execution. Some of the features of Subject7 are that it supports regression, functional, API, end-to-end, database testing, and non-functional testing, including load, performance, accessibility, and security testing.
  • Eggplant – It is an automation testing tool which mainly focuses on GUI test automation and functional testing. It is a licensed tool developed by the Test Plant organization. It can be integrated with other tools such as Jenkins, IBM rotational quality manager, HP quality centre, etc., to ensure end-to-end test execution. It is compatible with almost every operating system, such as Mac, Windows, and Linux.
  • Ranorex Studio – It is a testing solution for automation testing of mobile, web, and desktop applications. It also helps in shortening the regression testing cycle. It is mainly used for GUI testing with data-driven and keyword-driven testing frameworks. It can also integrate with other tools like Jira, Jenkins, Git, Travis CI, TestRail, etc.
  • TestComplete It is a licensed automation tool mainly used for performing functional and regression tests for mobile, desktop, and web applications. TestComplete is developed by SmartBear software which works on the GUI functional testing. It supports functionalities such as record and playback, scripting and manual modes for tests with built-in keywords. It also supports several scripting languages like Python, JavaScript, VBScript, Delphi, etc., and different testing techniques such as data-driven testing, keyword-driven testing, distributed testing, and regression testing.
  • SoapUI It is an open-source functional testing tool mainly used for API testing. It is primarily designed for testing SOAP (Service-Oriented Architectures) and REST (Representational State Transfers) web services. Like TestComplete, it is also developed by SmartBear software and entirely scripted in Java and Groovy programming languages. It can also be used for other types of testing, such as performance testing, regression testing, security testing, etc.

Difference between Regression Testing and Retesting

Regression Testing

A type of testing is performed when the source code is modified, or some modules are upgraded to ensure the existing functionality remains untouched and works as expected. The objective of regression testing is to ensure that no new bugs or defects occur when there is a code change or a bug got fixed. It is usually performed on the passed test cases.

Retesting

A process of testing the previously failed test cases to examine their functional behaviour is known as Retesting. In simple words, retesting means validating and confirming the previously failed test cases in the latest release must be passed now after the defect is fixed. It is performed based on the defect fixes.

Following are the differences between Regression testing and Retesting:

Regression TestingRetesting
It is performed to ensure that a recent modification or program change doesn’t affect the existing modules and features of the application.  It is performed to ensure that the previously failed test cases are passing now after the defects got fixed.  
Regression testing doesn't include the defect verification part.  Retesting includes defect verification.
The objective of regression tests is that newly added features or code modifications should not impact the existing functionalities.  The objective of retesting is to ensure that the failed test cases of the last execution or the previously opened defects are fixed.
It is done on the passed test cases.It is done only on the failed test cases.
It is better to do regression testing through automation as it saves time and the cost of testing.Retesting test cases cannot be automated; therefore, it can be done manually.
It is also acknowledged as Generic testing.We have to plan to retest; hence, it is acknowledged as Planned testing.
Test cases for regression testing can be obtained from the functional specification, user tutorials and manuals, and defect reports regarding corrected problems.  Before starting testing, we cannot prepare or obtain test cases for retesting.  
Regression testing checks for unexpected side-effects  Retesting makes sure that the original fault has been corrected.  

Difference between Regression testing and Functional testing

Regression Testing

Regression testing is a type of software testing performed when the source code is modified or some modules are upgraded to ensure the existing functionality remains untouched. The objective of regression testing is to ensure that no new bugs or defects occur when some modifications are done, or a bug gets fixed. Reusable test cases are used for regression testing.

Functional Testing

Functional testing is a type of testing performed to ensure that each functionality of the software or application should be working as per the requirements specified by the client. In other words, it is used to test all the basic and critical functionalities and features of the product against the specified functional requirements.

Following are the differences between Regression testing and Functional testing:

Functional TestingRegression Testing
It is done to ensure every essential feature and function of the software works as per the requirements specified by the clients.It is performed to ensure all the existing functionalities and features are working fine whenever some new features are added or modified.
The primary purpose of functional testing is to analyze and validate the developed application or software against the desired requirements.The primary purpose of regression testing is to supervise and validate the application's modification, and it should not impact other modules and features of the application.
The scope of functional testing is limited to a specific feature or module. E.g., testing GUI elements like colour, font size, background, buttons are clickable or not, etc.The scope of regression testing is not limited to a particular feature or module. It covers all modules and components and is carried out when an existing feature has been modified, a new feature is added, or a defect gets fixed.
In functional testing, all the test cases will be executed that are designed for a particular feature or complete application under test with multiple or single data inputs.On the other hand, regression testing includes previously used test cases for retesting the new builds and compares the result with earlier builds.
It is mainly required in the following areas:
When a new product is being tested
When the software is being tested against its pre-defined requirements and specifications.
To test the full functionality of the system.T
o validate the workflow and integration of the modules in the system.
It is mainly required in the following areas:
When a Change Request (CR) is logged by the client.
A new feature or function is added to the existing system.
The code has been modified.Defects/ bugs get fixed by the developers.
Changes made to the testing environment.
Functional testing is easier to automate and can be executed using GUI without human intervention.Regression testing can be automated to some extent, but most of the time, it is performed manually.
For executing functional tests, some testing techniques or other testing types are used, which are mentioned below: Black box testing Unit testingInterface testingWhite box testingSystem integration testingFor performing regression tests, below mentioned testing techniques are used: Retest all techniqueTest case prioritizationRegression test selectionHybrid testing technique

Advantages of Regression Testing

Following are the advantages of Regression Testing:

  • Regression Testing helps in improving the quality of the product as it is responsible for the overall stability and functionality of the product.
  • It ensures that no new defects and bugs are generated when some new functionalities have been introduced in the product.
  • It also ensures that the previously fixed issues won’t get generated in future.
  • Regression testing can be done in a faster and easier way with the help of automation testing.

Disadvantages of Regression Testing

Following are the disadvantages of Regression Testing:

  • One of the significant drawbacks of regression testing is that even when there is a small code change, or an essential feature is added, it is mandatory to do regression testing to ensure that the new and existing features are working fine without any issues and bugs.
  • It is essential to do regression testing with the help of automation. Otherwise, it will be time-consuming and tedious because we have to execute several test cases multiple times.
  • When the requirements are frequently changing, it is challenging to perform regression testing, and it may also increase the overall cost of the project.