Search code examples
postmanpostman-collection-runner

Postman Collection Runner runs stale request. Solution?


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.


Solution

  • 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.