Collection driven by csv - how can I skip to end of an iteration and continue onto the next row in csv?
For illustrative purposes, I am simplifying the actual logic of the collection.
I have a collection with a bunch of requests. The csv file has a column called “Flow” with 3 potential values:
A - execute the first 5 requests and then skip to the end (move on to the next row in the csv and start the next iteration)
B - execute the first 5 requests (the ones run in Flow A) PLUS the next 6 requests, and skip to the end (move on to the next row in the csv and start the next iteration)
C - execute all the requests
It’s the “skip to the end (move on to the next row in the csv and start the next iteration)” that I’m having trouble with. This particular collection has cumulative flows - you can do flow A, A+B, or A+B+C. It would be very convenient to be able to skip to the end based on the selected flow.
I use postman.setNextRequest() throughout the collection for skipping a request here and there as needed. But is there a way to force skipping to the the next iteration of the collection with the next row in the csv?
I have considered the possibility of adding in an extra harmless request at the very end of the collection and naming it “final” so that I can do postman.setNextRequest(“final”). Thoughts on this as a solution?
- Platform Details: Postman for Windows
Version
11.9.2
UI version
11.9.2-ui-240822-1348
Desktop platform version
11.9.0
Architecture
x64