# How do I produce non-repeating test data?

**URL:** https://community.gatling.io/t/how-do-i-produce-non-repeating-test-data/2523
**Category:** Gatling (Open-Source)
**Created:** [September 10, 2015, 1:57pm UTC](https://community.gatling.io/t/how-do-i-produce-non-repeating-test-data/2523 "2015-09-10T13:57:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rich\_Bolen](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@Rich\_Bolen](https://community.gatling.io/u/Rich_Bolen)
#### Post date: [September 10, 2015, 1:57pm UTC](https://community.gatling.io/t/how-do-i-produce-non-repeating-test-data/2523/1 "2015-09-10T13:57:56Z")

</div>

I’m trying to load test a system that captures time series data. I’d like all the feeder data to be unique (by timestamp) instead of repeating. Is there a way to produce the test data as the test is running instead of pre-test or compile time? I’d like to simulate millions of clients sending data over time. Is this possible?

I’m using Gatling V2.1.7.

Thanks,  
Rich

---

<div class="post-metadata">

### Author: ![Alain\_Moran](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Alain\_Moran](https://community.gatling.io/u/Alain_Moran)
#### Post date: [September 10, 2015, 2:34pm UTC](https://community.gatling.io/t/how-do-i-produce-non-repeating-test-data/2523/2 "2015-09-10T14:34:06Z")

</div>

Just code your own custom feeder, here’s one that increments a variable

`

```auto
val messageNoFeeder = new Feeder[Int] {
  private var messageNo = messageStartPoint

  override def hasNext: Boolean = messageNo < messageCount

  override def next(): Map[String, Int] = {
    messageNo += 1

    Map(
      "message" -> messageNo
    )
  }
}

```

`

---

<div class="post-metadata">

### Author: ![Rich\_Bolen](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@Rich\_Bolen](https://community.gatling.io/u/Rich_Bolen)
#### Post date: [September 10, 2015, 2:49pm UTC](https://community.gatling.io/t/how-do-i-produce-non-repeating-test-data/2523/3 "2015-09-10T14:49:19Z")

</div>

I figured it out. I had the feed method before my repeat call causing the test data to be repeated for each repeat. I moved the feed call inside the repeats call (and before the exec call) and it works.

So I went from this:

```auto
val scn = scenario("Simulation for posting pointframe data to the bigress server").feed(feeder).repeat(repeatCount) {
  exec(
    http(session => "Post a Point Frame message to the bigress server.")
      .post(postPath)
      .headers(sentHeaders)
      .body(StringBody("${json})"))
      .check(status is 200)
  ).pause(1)
}

```

to this:

```auto
val scn = scenario("Simulation for posting pointframe data to the bigress server").repeat(repeatCount) {
  feed(feeder).exec(
    http(session => "Post a Point Frame message to the bigress server.")
      .post(postPath)
      .headers(sentHeaders)
      .body(StringBody("${json})"))
      .check(status is 200)
  ).pause(1)
}

```
