Intro to Regression Testing with Postman

Updated: Sep 4

Gist file with the tests script and Github repository with the Postman Collection can be found at the end of the post.



There are different types of software tests that a team can build to make sure that the final product will work as expected.


However, in this post, we’ll focus on one particular type: Regression Testing.



What is Regression Testing?


Regression testing is a type of software testing, in which tests are created to ensure that a new change to the code did not break existing functionality.


Let’s illustrate this definition with a metaphor: Imagine that you have a car that works perfectly fine; and you know this, because you checked that everything was working:

  1. Do the lights turn on? Yes.

  2. Does the car start? Yes.

  3. Does the air conditioner work? Yes.

  4. Do the windows go down and up? Yes.

  5. Does the radio work? Yes.

  6. Are my tires pumped up? Yes.


Now, let’s say that you installed some neon lights to your car and then when you tried to turn the car on, but guess what? It didn’t work! The lights must’ve done something to the car, because it was working before installing them.


Remember the 6 tests that you performed before, to make sure that your entire car was working? Well, now that you installed the neon lights to the car, let’s do these tests once more…

  1. Do the lights turn on? No.

  2. Does the car start? No.

  3. Does the air conditioner work? No.

  4. Do the windows go down and up? No.

  5. Does the radio work? No.

  6. Are my tires pumped up? Yes.


So, a lot of them are failing now, and the ones that are failing are relying on the car’s battery to be able to work properly. It’s possible that when you installed the neon lights, something went wrong and it messed with the battery. You got to this conclusion by paying attention to the failed tests; and you were able to isolate this, because you did one additional test that didn’t have anything to do with the battery, and it did not fail.


This set of 6 tests, are actually regression tests. Why? Because you are performing different tests to make sure that the whole car is working properly, after you added new functionality to it. If you add more detailed tests, you will ensure even more that the car doesn’t break with a future change.



Creating basic tests with Postman


You can download Postman for free from their website: https://www.postman.com/downloads/

Once you have it, open it, and it will look something like this:


postman interface