Loading

Regression Test Selection


What is regression testing?

A technique adopted to validate the unmodified portions of a software product ensuring that no new bugs have arrived and that they remain intact and unaffected, is known as regression testing.

It can be classified as one of the software maintenance activities, which is carried out by selecting appropriate test selection algorithms, to reduce the time taken to test the changes that took place on account of a feature addition or modification.

Regression testing can be a time consuming and lengthy process as it involves implementation of test cases for the whole program repeatedly unless we are sure that the software product is error free. The reason that a 'regression test selection' process is undertaken is due to the fact that a handful of test cases will actually serve the purpose of retesting the existing software to ensure that the portions of changes is not interfering with the unmodified sections of the application.

Regression Test Selection

The test cases for 'regression testing' is chosen from among the list of scenarios that have been modified or updated recently. Test cases are thus prioritised as per requirements by applying a suitable regression test approach.

Software maintenance activities:

  • Software release and user feedback -once a software product is released, the software product is at the discretion of the end user. The user provides the necessary feedback regarding the functioning of the software product. Reports bugs and flaws, if any.
  • Change requirements -the next step is to figure out the areas of change, which portion of the program needs modifications and what amount of time needs to be invested.
  • Changes in code -it's now time for actually modifying the product in accordance with the change specifications laid down.
  • Finding a resolution -if any unresolved task remains at the developer's end with respect to the change requests, then those issues are addressed first.
  • Regression testing -now we perform regression test on the modified portions of the software product, and see if any bugs arise during this process, and hence we fix it.

The above sequence of activities is a process of processing, analysing, and finding a solution to the software product.

Regression Test Selection:

This is a way of selecting the most appropriate test case to ensure that it delivers the correct result. It thus enables a tester to select a valid set of test cases to make sure the unmodified part of the program is error free.

So we can categorize the concept of test selection for regression testing into two broad categories:

  • Identify the affected parts of the program - when a particular module is changed, other parts of the program are bound to be affected. It is time for identification of bugs in the unmodified parts of the program.
  • Test case selection -involves selection of test cases from an already defined test suite.

Here we can state another interesting concept, that is, Test- Driven Development. This is a method of execution of test cases repeatedly, to ensure the right product is being built.

So if we try to define it in a bit more mathematical way, we can say, regression test selection comprises of selecting a subset T' of the actual test suite T. Hence T' may contain few test cases {t1,t3,t4} , those test cases that will help us to manage our unmodified part of program.

There can be various approaches to test case selection. We may understand the concept by focusing on one of the many approaches.

For instance, we have a test suite T with test cases {t1,t2,t3,t4,t5}.

When applying regression testing, we may need only {t1,t2} out of all the test cases, which are considered to solve our purpose.

Few regression selection algorithms used:

  • Safe - The first approach considers a regression test selection technique, which includes all those test cases which cover the modified methods at least once.
  • Minimisation - selects minimum number of those test cases that execute all the modified portions.
  • Random 25% - selects 25% of the total number of test cases.
  • Random 50% - selects 50% of the total number of test cases.
  • Random 75% - selects 75% of the total number of test cases.

These selection techniques provide a very controlled environment for identifying the faults in a given program.

Regression test selection can further be categorised into three categories:

  • Coverage techniques: it is based on coverage criteria. These include coverable components for the modified portion if the program.
  • Minimisation technique:works similar to coverage technique, however it is based on selection of minimum number of test cases.
  • Safe techniques:unlike coverage technique, it selects those test cases that causes a modified program to produce different output other than the original program.

The parameters which forms the basis of comparison and evaluation of the selection techniques are as follows:

  • Inclusiveness: analyses the extent to which a test case selection will cause the modified program to produce different output other than the original. Helps to capture faults caused as a result of modifications.
  • Precisionthose test cases are not selected that won't produce a different output than the original one.
  • Efficiency:calculates the cost of computing and practicality of adopting a technique.
  • Generality:ability of a technique to handle varied language constructs, complex changes in the system.

Summary:

The above analysis about regression test selection brings out the core idea behind regression testing, the selection criteria involved and the ways to counter the issues involved. Regression testing can be thought of as a backbone to the entire process of software maintenance. It is a technique for solving the issues left out while in the software development phase.