# post all data from feed during one scenario

**URL:** <https://community.gatling.io/t/post-all-data-from-feed-during-one-scenario/1931>\
**Category:** Gatling (Open-Source)\
**Created:** [January 25, 2015, 4:47pm UTC](https://community.gatling.io/t/post-all-data-from-feed-during-one-scenario/1931 "2015-01-25T16:47:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serega\_Sheypak](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Serega\_Sheypak](https://community.gatling.io/u/Serega_Sheypak)\
**Post date:** [January 25, 2015, 4:47pm UTC](https://community.gatling.io/t/post-all-data-from-feed-during-one-scenario/1931/1 "2015-01-25T16:47:04Z")

</div>

Hi, I have a feed which has 10 records. i want to write a scenario, which sends each record from feed one by one with 5 seconds pause  
Here is my code:

```auto
val scn = scenario(name)
    .feed(generateFeeder(userId, shopId, limit))
    .exec(
      http("Setting up data for test")
        .post(postHistory)
        .param("d", "${d}")
        .check(status.is(200))
    ).pause(5)

  setUp(
    scn.inject(atOnce(1))

```

```auto
  ).protocols(httpConf)
}

```

```auto
generateFeeder(userId, shopId, limit)

```

generates synthetic data for a test

scenario runs ones and send one POST. I would like to send 10 POSTs during scenario one by one with 5 seconds pause between.  
How Can I do it?

---

<div class="post-metadata">

**Author:** ![Serega\_Sheypak](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Serega\_Sheypak](https://community.gatling.io/u/Serega_Sheypak)\
**Post date:** [January 25, 2015, 4:56pm UTC](https://community.gatling.io/t/post-all-data-from-feed-during-one-scenario/1931/2 "2015-01-25T16:56:55Z")

</div>

I’ve tried this solution:  
[https://groups.google.com/forum/#!searchin/gatling/feed$20loop$20over$20all$20records/gatling/9ssx0nZy9TA/edV7JP\_nwRsJ](https://groups.google.com/forum/#!searchin/gatling/feed%2420loop%2420over%2420all%2420records/gatling/9ssx0nZy9TA/edV7JP_nwRsJ)

with “repeat” statement,

val comScn = scenario(“My scenario”)

.repeat(systemsIdentifier.records.size / nbUsers) {  
feed(systemsIdentifier)  
.exec(performActionsChain)  
}

but i get compilation error:

Simulation.scala:22: not found: value feed  
18:54:18.465 [main][ERROR][ZincCompiler.scala:98] i.g.a.ZincCompiler$ - feed(generateFeeder(userId, shopId, limit))  
18:54:18.465 [main][ERROR][ZincCompiler.scala:98] i.g.a.ZincCompiler$ - ^  
18:54:19.539 [main][ERROR][ZincCompiler.scala:98] i.g.a.ZincCompiler$ - one error found  
Exception in thread “main” Compilation failed  
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:105)

---

<div class="post-metadata">

**Author:** ![Serega\_Sheypak](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Serega\_Sheypak](https://community.gatling.io/u/Serega_Sheypak)\
**Post date:** [January 25, 2015, 6:45pm UTC](https://community.gatling.io/t/post-all-data-from-feed-during-one-scenario/1931/3 "2015-01-25T18:45:28Z")

</div>

I did it this way:

```auto
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import bootstrap._

```

```auto
val historyScenario = scenario(name)
  .feed(generateFeeder(userId, shopId, limit).queue)
  .repeat(limit){
    exec(
      http("Setting up data for test")
        .post(postHistory)
        .param(visitParam, "${visit}")
        .check(status.is(200))
    ).pause(5)
}

```

i had to import

```auto
import bootstrap._

```

is this approach OK? Is it gatling-style?
