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
Just code your own custom feeder, here’s one that increments a variable
`
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
)
}
}
`
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:
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:
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)
}