Skipping iteration on collection runner

Hi Team,
As we know using Postman Collection runner, we can iterate n number of times using a data file (csv/json).e.g: This is my csv file.
If we use iterations value as 3, all the 3 variables (a,b,c) will be executed one by one.
But I want to only use variable b as data for my test. I don’t want to iterate through all the values.
Is this possible to do with Postman?

Hi @mithunlikes ,

Welcome to the community! You can go through the solution mentioned here, it’s similar to your problem.

Useful documentation:

Hi @suraj.purohit,

Thanks for the swift response.

The solution you have suggested works on the case where we have blank("") values.

I am looking for something where we can skip an iteration itself. e.g. I have 3 sets of data in my previous example (mentioned in the question).

I want to only use iteration 2 data, which means I want to skip iteration 1 and 3 completely, so that i can access variable “b” and value “2” only for my test.

Please suggest me on same. Thanks in advance.

Write code that reads the file, and then uses the 2nd value to set environment variables that are used for all runs.

Personally I would create a pre-run call that does the variable setup. Then loop over the call that runs multiple times and read the values set in earlier call.

Thanks for the response. So looks like we can’t skip the iteration and access to a random iteration number using collection runner :expressionless: