1
votes

A couple of days ago, I ran a collection of two requests in Postman.

I was using an environment variable created in the first request which was then used in the second request.

I ran the two requests manually in the primary application interface of Postman, one by one. The responses were as expected and there were no errors. But when I tried running the whole collection in one go from the Postman Collection Runner interface, the second request gave me an error.

I checked and double-checked that I was running the right collection. I closed and reopened the Collection Runner window. Also, in the Collection Runner window I tried switching to some other collection, and then switch back to the collection of interest. As I remember it, I even exported, deleted, and then imported the collection again. None of these actions would make the error go away.

One thing I noticed was that - when running in the Postman Collection Runner - the first request would create an environment variable with a stale name, that is with a name I had used previously for the same environment variable. However, when running the first request manually (not in the Collection Runner window), the environment variable was created under its new correct name.

I cannot reproduce this behavior, and therefore I don't expect to see a genuine solution to the issue. But a workaround would be much appreciated.

1
Without more context about the Collection itself and actually seeing what is happening, it's always going to be tough to provide an answer to this type of question. Reading a lot of text that describes the problem is never going to be the same as using images to show the problem. It could have been a number of things that might have been the issue. Without seeing the state of the UI at that time - It's all guesswork. - Danny Dainton
> Without more context about the Collection itself and actually seeing what is happening, it's always going to be tough to provide an answer to this type of question. * | * Agreed. Unfortunately, I have not much of an idea how to reproduce the issue. Although the collection is not a secret, I don't think providing it would be of much help for a solution. And for the time being, I am quite happy with the "solution" of deleting all requests in the history. I still wanted to write/publish this as a Q&A for documentation purposes. - I might run into the same problem at some point in the future. - Henke
Providing as much detail to the problem is super important when you're asking people, who are not sitting in front of your machine and seeing what you can see. It paints a broader picture of the issue for others to see. You shouldn't ever need to delete the history in order for the Collection runner to work correctly, so there is likely something else going on. The Request view and changes made there won't reflect in the Runner unless those are saved first. It could be an older Collection you're running but you would see that on the individual requests. etc. - Danny Dainton
In case you are really interested, I just uploaded (a later version of) the collection at schulze.000webhostapp.com/postman/pmCollectionRunner/…. If you want the tests to pass, you will have to replace the current value of the collection variable MBID with a valid identifier, for example 5b11f4ce-a62d-471e-81fc-a69a8278c7da. But there is nothing to find here. I just tried running the requests, and there are no errors. - Not in the Postman primary interface / nor in the Postman Collection Runner window. It works fine in both cases. - Henke
It wasn't me but users are free to downvote if they feel like the question doesn't meet certain criteria or isn't helpful - They don't really need to return to the scene of the crime and explain themselves. It happens, it will continue to happen the more you use the platform. - Danny Dainton

1 Answers

0
votes

In vain I had tried just about anything I could think of. Then I found a post at the Postman community on How to remove some or all requests from the history.

See the second post of the link ( = first answer ). It says:
"There is also a Clear All selection at the top of the History section if you want to remove everything."

In the Postman primary interface, just click History > Ellipsis (...) > Clear all.

Voilà! - No error when running the collection in the Collection Runner window.


For navigation help, see the images below.

In the left pane, click on History.

Click the ellipsis (...) and then on Clear all.