What is Regression Testing – Examples and Features

What is Regression Testing – Examples and Features

Tracy Watson

20/02/2020

7 min read

regression testing

Creating an app is hard work. You have to deal with things like changing requirements, finding and eliminating bugs, and adding new functionality. If you decide to add new features or make changes to the ones you already have, this could have a domino effect on the performance of the entire application. In order to ascertain that everything is functioning the way it is supposed to, companies incorporate regression testing into the SDLC. Let’s take a closer look at regression testing so we can understand why it is important to conduct when developing software.

Definition of Regression Testing

When you are creating the app, you are bound to make some alterations or adjustments to the code. When this happens, how do you know if the changes have not negatively impacted the functionality? The way you find this out is through regression testing. Basically, this is taking some of the tests you have already performed and just doing them again to ensure everything is working as intended. This form of testing is done when:

  • Changes to the existing requirements made
  • New features added
  • There are flaws that need to be fixed
  • There are performance issues that need to be fixed

How does this look in practice? Let’s consider some regression test examples. Imagine that you have an app with functionality X + Y. During the testing process, a bug is detected. Patches are performed in the software itself to fix the bug, thus altering the original code. However, while you were implementing the patch, the functionality that you already have, Y – X, is affected. In this scenario, regression testing is needed to determine whether or not functionalities X and Y are able to work as they were originally intended.

Another example can be that you are adding functionality Z to that currently in place. You need to run such testing to determine whether or not X+Y has been impacted with the alterations in functionality X * Y.

How to Write Regression Test Cases

The regression tests can be written in several ways:

  1. Comprehensive retesting – This is when all of the tests in the current suite need to be redone. As you can imagine, this can prove to be very costly.
  2. Selection of tests – Instead of performing all of the tests over again, you choose specific parts of the test suite that need to be redone. These can be further categorized into reusable and outdated tests.
  3. Prioritization of test cases – Sometimes, certain tests will be given more priority based on their business impact and how critical it is to the overall functionality. Writing your cases with this method will further help to reduce the Regression Testing suite.
regression testing suite

How to Do Regression Testing

You have the option to conduct regression testing manually or do it automatically. We will get into the pros and cons of each testing type. Later on, you should perform both types because each will be useful in uncovering specific kinds of issues in certain areas.

The benefits of manual software regression testing include:

  • Easier to adapt to changes
  • Find issues relating to the look and feel of the app faster
  • Small changes can be made on the go
  • Can be used for exploratory testing

The negatives are:

  • Some tests simply cannot be performed manually
  • The results will not be as reliable as with automated tests
  • Time–consuming
  • Can lead to team demotivation and apathy

The alternative is to automate the testing. You can program the repetitive regression test cases to run in the background or even during the time when nobody is working. Ideally, you should perform regression testing after every deployment that you do. The most popular tools to use are:

  • Selenium
  • Appium
  • Record & Replay

Like we said a little bit earlier, you should not rely solely on a particular type of test. While automated testing is faster and more efficient, it only goes so far. Perhaps it works best if you have a particular assertion, and you need to find out whether or not it is correct.

The benefits of automated testing include:

  • Tests can be recycled and repeated
  • Use up less time and money
  • Provide more dependable results

The downsides of automated testing are:

  • Automated tests are more expensive
  • The tools used may have defects
  • More of technical background is required for the team members
how to do regression testing

 Start Testing Early and Often

During the build process, it is vital to incorporate regression testing whenever changes are made, and when you add new functionality. By detecting issues early on, you will be able to save a lot of time and resources and keep the project on schedule.

Subscribe to our newsletter