Hi folks,
I want to be able to re-run the test script multiple times after Sending the request.
This feature is useful when building the test suite.
Is there a way to achieve this?
Thanks,
Kunal
Hi folks,
I want to be able to re-run the test script multiple times after Sending the request.
This feature is useful when building the test suite.
Is there a way to achieve this?
Thanks,
Kunal
Hi Kunal,
Thanks for reaching out! Welcome the Community. ![]()
Have you considered looping your whole Test script (i.e. put the whole script in a for loop)? There isnāt a way right now to run just a Test script detached from a request right now.
Being able to re-run a test would be super useful while writing and refining it.
Hey @gabriel-r , like in the above answer, wouldnāt looping help?
Not sure how looping would help me or the OP.
Looping would rerun the request and not allow edits between runs.
My need (and OPās, I believe) is to be able to just run the current test on the already present response.
This is even more relevant when using paid services where every request is money, and you need to make hundreds while building the test suite.
Looping in the tests tab will run the same code multiple times for the one response received. There could be other hacks in Postman as well Iām thinking. But it would help you can share an example use case? Iām interested in understanding the need a bit more.
Thanks 
The use case is āusing the Test tab as an IDEā.
This 3rd step will take a while. I have more than a couple of variables, different tests, environment variables, looping through different requests, etc.
During this, I want to run the Test like 100 million times, output stuff to the Console, check values and formats, try 10 times until I get the right JSON path for some value in the response, etc.
During this Test editing, I want is to simply rerun the test alone, without re-running the request.
Does it make sense?
Thanks for sharing with so much detail, really appreciate it.
Iām thinking of a workaround, letās say you hit the API once, save the response as an example response and spin up a mock server in postman that will return the response that the original API returns. Since this is a mock, you can hit it as many times as you like, unlike the original API.
Iāll try this out in a while and share a link to the public workspace solution.
What do you think? Does that sound like a possible solution?
Sounds fancy and super useful 
Many thanks!

Hey @gabriel-r, this use recently came up for me and I created a mock server to test all the code in the pre-request and test scripts. Made a short walkthrough for you ![]()
This sounds perfect! Canāt wait to try it out as soon as I get back to this project.
PS: @kunal This seems to be the answer you were looking for?
Like in the above reply, āBeing able to re-run a test would be super useful while writing and refining it.ā
Thatās what we want and not a work around.
Hey @danielsunauto ![]()
Welcome to the Postman Community! ![]()
That capability has been in the platform for a while now, in the Test Results section, you can use the āRefresh resultsā button on the right, to run the tests against the response again without sending a new request. ![]()
As you can see in the video, you can also add tests, amend tests or removed them without running the full request. The is only running against the current results so if something were to change with the API response, that wouldnāt be picked up here and you would need to hit Send again.
This is only going to work in a test management context, this action wouldnāt write anything to the console or set variables - you would see need to make a request to do this.