Request info

When to use functional testing vs. regression testing

Difference between functional testing and regression testing

Scope

Functional testing is feature specific and it has a limited scope. If you build a car that has a special navigation feature, you will test that the feature is able to correctly locate you on a map, and guide you safely to any destination that you put in. 

If the navigation panel wasn’t powering on, and the mechanic fixes it, you will check that it now works but you will also check to make sure everything else on the car’s dashboard such as the radio, the blinkers, the gas gauge, and the speedometer are all working correctly. 

In many cases, regression testing will mean testing the product end-to-end while functional testing will mean checking if just one feature works.

Product life

Functional testing and regression testing will occur throughout a product’s life, but a product will go through regression testing far more often than it will go through a functional test.

Every new feature will go through its own functional testing cycle but a new feature will also be a reason to regression test other features. Regression testing occurs after all bug fixes as well.

Functional testing vs Regression testing

The difference between functional difference and regression testing comes down to focusing on the purpose of each testing type.

Functional testing answers a basic question about a feature: Does it work? 

So for functional testing, an example would be: In order to regulate traffic coming from multiple lanes, traffic lights are installed to signal to drivers when they can go, and when to stop.

Whereas for regression testing it would be: In the USA, LEDs replaced the usual incandescent bulbs that were used in traffic lights. The intent was to reduce energy usage, but LEDs do not give off heat the way incandescent bulbs do.

This led to the snow building and setting on the traffic lights in winter, making them impossible to see. Technically, the lights still worked but drivers could not see them.

Acceptance criteria

Functional testing doesn’t just test if a feature works, it also tests if a feature works the way it is meant to. If you add a navigation feature to a car, it isn’t just supposed to help locate you on a map or find a place on a map.

It is supposed to be able to guide you to your destination. We call this the acceptance criteria of a feature and functional testing checks for it, for that one feature.

Regression testing must look at the acceptance criteria of several features instead of just the one feature that was fixed, added, or updated. This is because when implementing a new feature, or fixing a bug, the fix may break an essential component of a different, unrelated feature.

In doing so, the acceptance criteria for that feature will no longer be fulfilled and this can only be determined if a tester looks at the acceptance criteria for all features that are impacted by the change.

Why we do functional and regression testing

This, in turn, helps engineers when they are developing new features as well since they know certain parts of the code depend on or are linked to other parts. 

For product teams, learning which features depend on each other to deliver a functioning product is essential not just when they’re planning bug fixes but also when new features are to be implemented.

In-house testing vs crowd-sourced testing

Jumbotron image