WHAT IS A REGRESSION (TR) OR NON-REGRESSION (TNR) TEST?

By
5 Minutes Read

When you want to validate the quality of your web or mobile application, there are many tests available. And one of the most essential is the regression test. But what is it exactly? Here are some explanations. 

 

What is a regression? 

Basically, the word "regression" means "an evolution that brings back to an earlier stage". In computer science, a regression occurs when a code change has an impact on the existing code. This can be due to a bug fix, a software update, or the addition of a new feature. 

For example, when a new feature is implemented, if it disturbs the behavior of previously existing features, then there is regression, because a bug has been introduced. To avoid this, technical teams set up specific tests, which are called regression tests or non-regression tests .

 

What is a regression (or non-regression) test? 

According to the ISTQB definition, a regression test consists of testing a previously tested program, after a modification, to ensure that defects have not been introduced or discovered in unmodified parts of the software, as a result of the modifications made. 

In short, a regression test is used to verify that changes made to the software, website or mobile application, such as the addition of a new feature or an update, have not impacted the previously existing features. Let's take the example of a bicycle: if the wheel is changed, a regression test would consist in verifying that despite the change of wheel, the brakes still work (but it is not necessary to verify that the bicycle pump still works). 

What is the difference between regression and non-regression testing? In reality, there is no difference, it is exactly the same thing. We use both terms. The ISTQB, for example, prefers the term regression testing. But many people in the field also use the term non-regression test, at least in France. It's all a question of choice and it's true that when you don't come from the field, it can be confusing. What do you expect, the French are complex people who like to play with words! 

test regression

 

Regression and Functional Tests 

Functional tests allow to verify that a software (website, mobile application, API...) works in accordance with the specifications determined by the customer beforehand. On an e-commerce website, this consists for example in checking that the connection to the account or the addition to the cart or the selection of a delivery method does not cause any bug and that there are no differences with the data provided beforehand.

Regression tests are performed when a new version of the code is released, in order to verify that it has not caused any error in the rest of the software. They can target functionalities as well as non-functional aspects, such as performance. For example, if an update causes the site or application to take longer than usual to respond, this is called regression. 

 

What are the different types of types of regression tests?

Regression or non-regression tests can be performed in several ways, depending on the need or the resources of the company. 

Corrective regression testing, for example, reuses existing tests, provided that no significant changes have been made to the product. 

Full regression testing involves retesting all elements of the product. This allows you to verify all the changes that have been made since the beginning. 

Selective regression testing, on the other hand, allows you to choose certain tests from a set in order to inspect only the parts of the code that have been impacted.

Incremental regression testing involves creating new tests when established tests are no longer useful, such as when product features change. 

Partial regression tests are performed when different modules are under development and are about to be merged with the main version of the code. 

Unit regression tests are used to test the code individually, without taking into account the other elements. 

failed test automation

 

When to run regression tests? 

Regression testing can be performed at any level of the test plan, and it is recommended that it be performed as regularly as possible, as soon as a change or update is made, and as early as possible in the product's design. 

But generally, non-regression tests are performed when there is : 

>> a correction that is made to the code to resolve anomalies
>> a new feature that is added 
>> a modification of an existing functionality
>> an update made in the environment (e.g.: data) 
>> an optimization of the source code 


Why do regression tests? 

The first reason for doing regression testing, which should be the main reason for all other types of testing, is that it ensures the quality of the software (website, mobile application). And, by offering a quality product, it also improves the user experience and thus the company's image. 

Secondly, performing regression tests reduces the risks associated with updating applications, websites, etc. This is important because in addition to the fact that it can cause bugs that prevent the use of certain functionalities (which can have an impact on the company's turnover and its image), it can also cause security flaws. And there, it is the credibility of the company which is at stake, as well as the trust of the users in the latter. 

Besides a quality, risk and image story, the point of running regression tests regularly is to save time and money, as it is always more complex and expensive to have to fix a bug in production. Not to mention that these are the most relevant tests to automate and that automation also saves time and money, but we'll come back to that later. 

Finally, when developing mobile applications or SaaS software, which are continuously updated to meet customer requirements, regression testing is all the more necessary.

404 error bug

 

What are the limitations of regression tests? 

Regression testing is very time-consuming and repetitive. And while they should be automated for the most part, some test cases must be performed manually. What's more, some complex features require complex test cases, and this can also delay the execution time and therefore the delivery time. In short, due to time and budget constraints, not all regression tests can be executed and it is therefore important to choose the ones that are important to perform first .

 

What aboutautomation of tests?

As we said above, non-regression tests are very useful to be automated and they are often the tests that we recommend to automate first. Why is this? Because they are repetitive and time consuming. They are executed at each deployment of a new feature or software update and doing them all manually takes time, a lot of time, not to mention that it requires doing a lot of easy things and the sequence will be tiring and become difficult. So that's where the automation of regression testing cases makes sense. 

Finally, test automation allows you to identify possible regressions as early as possible and, above all, it allows you to keep up with delivery rates and thus improve ROI. However, it is not necessary to automate everything and it is generally recommended to focus on test cases with frequent defects, test cases that verify essential, critical product functionalities and test cases that verify functionalities that have undergone numerous and recent modifications.

 

Request a demo

 

Screenshot 2022-07-06 at 16.18.40

 

Picture of Mr Suricate

Mr Suricate

Author