Correct values for iteration and delay for a data file?

I’ve got a file with 1000s upon 1000s of lines that I have to run through the Runner. Because of how many lines it has, I need to set up a delay. But I’m confused about the iteration and delay inputs.

Is iteration “how many lines will be processed” or “how many times this file will be processed”?

Likewise, is delay “the amount of time to wait between each request” or “after every line in the file has been processed, then delay and then run through the whole file again”?

Hey @dmrickey :wave:

Iterations - The number of iterations for your collection run.

If you 1 request in your Collection and your data file has 50 lines (csv) or objects (json) that will run that single request 50 times.

Delay - An interval delay in milliseconds between each request.

If you have 2 requests in your Collection, the Runner with execute the first request and then pause for the time specified, then run the second request.

The Collection and datafile can also be run using either the Postman CLI on Newman from the command line.

So to make sure I’m understanding your answer: If I set iteration to 1 and have a data file with 123 lines, then it will run through those 123 lines each a single time?

No, it will only run 1 iteration of the Collection and use the variables from the first line in the data file.

You’re best off just creating a new Test Collection with a single request in it and experimenting with that.

That basic request can have a reference to a value in the datafile, for example:{{dataFileVariableKey}}

Sometimes seeing something happening in front of you, is better than reading an answer that might not make sense :sweat:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.