# Correct values for iteration and delay for a data file?

**URL:** <https://community.postman.com/t/correct-values-for-iteration-and-delay-for-a-data-file/56122>\
**Category:** Help Hub\
**Tags:** variables, collection-runner\
**Created:** [January 2, 2024, 10:58pm UTC](https://community.postman.com/t/correct-values-for-iteration-and-delay-for-a-data-file/56122 "2024-01-02T22:58:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmrickey](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@dmrickey](https://community.postman.com/u/dmrickey)\
**Post date:** [January 2, 2024, 10:58pm UTC](https://community.postman.com/t/correct-values-for-iteration-and-delay-for-a-data-file/56122/1 "2024-01-02T22:58:27Z")

</div>

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”?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 3, 2024, 4:03pm UTC](https://community.postman.com/t/correct-values-for-iteration-and-delay-for-a-data-file/56122/2 "2024-01-03T16:03:23Z")

</div>

Hey @dmrickey 👋

> **[Test your API using the Collection Runner | Postman Learning Center](https://learning.postman.com/docs/collections/running-collections/intro-to-collection-runs/#configuring-a-collection-run)**
>
> Test your API using the Collection Runner: documentation for Postman, the collaboration platform for API development. Create better APIs—faster.

_ **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](https://learning.postman.com/docs/postman-cli/postman-cli-overview/) on [Newman](https://learning.postman.com/docs/collections/using-newman-cli/command-line-integration-with-newman/) from the command line.

---

<div class="post-metadata">

**Author:** ![dmrickey](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@dmrickey](https://community.postman.com/u/dmrickey)\
**Post date:** [January 3, 2024, 4:22pm UTC](https://community.postman.com/t/correct-values-for-iteration-and-delay-for-a-data-file/56122/3 "2024-01-03T16:22:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 3, 2024, 4:29pm UTC](https://community.postman.com/t/correct-values-for-iteration-and-delay-for-a-data-file/56122/4 "2024-01-03T16:29:53Z")

</div>

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:

```auto
https://postman-echo.com/get?test={{dataFileVariableKey}}

```

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

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [February 2, 2024, 4:30pm UTC](https://community.postman.com/t/correct-values-for-iteration-and-delay-for-a-data-file/56122/5 "2024-02-02T16:30:37Z")

</div>

Closed on February 2, 2024, 4:30pm UTC

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