Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
221 views
in Technique[技术] by (71.8m points)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...