3

Every time I restart Postman and start a collection run, the order of the endpoints gets reset and I have to drag/drop them into the correct order for the run. Can this ordering be saved?

user2943799
  • 947
  • 2
  • 13
  • 23
  • As the answer says you have to rearrange collection and store if you want to persist it. COlelction runner is just for you to try the behavior for a specific order – PDHide Jun 15 '21 at 15:32

3 Answers3

0

Drag and drop 1 time and export this collection.

0

This is an annoying little problem when you want to re-run your test runners.

I solved this by duplicating my collection into a new folder. Then I arranged the requests in the correct order. Now when you start the test runner using this collection, the order is preserved.

However, it's not the ideal solution, because now you have to maintain two collections of the same things, but perhaps not in the same folder structure.

The only viable solution was if test runners could be saved as a part of your Postman collection.

Let me know if I missed something, this was just my experience.

ChrisRich
  • 8,300
  • 11
  • 48
  • 67
0

You can automate the postman run order by using the postman.setNextRequest("request_name") function.

On the 'Tests' tab of a request, add the following code, replacing request_name with the name of the request that you want to run next.

postman.setNextRequest("request_name")

This method is the one suggested by Postman in the docs. It is a little clunky but does give you the desired outcome.

More info: https://learning.postman.com/docs/collections/running-collections/building-workflows/

Alan
  • 31
  • 4