Custom feeder repeats only first line

Hi, I have a function which returns feeder data, it’s dead simple synthetic.

def generateFeeder(limit :Int) :Array[Map[String,String]] = {
  import scala.collection.mutable.ListBuffer
  //some stuff here

I print generateFeeder result to console and see that I have different records

Here is my code:

val historyScn = scenario(nameHistoryScn)
      http("Setting up data for test")
        .param(visitParam, "${visit}")
    ).pause(5 seconds)


and gatling sends only first line limit times
limit is equal to feeder items count. I want gatling to send all records, not just the first record X times.

Move feed inside the repeat loop.


val historyScn = scenario(nameHistoryScn)
    feed(generateFeeder(userId, shopId, limit).queue)

works! problem is solved.

Interesting! I thought to use custom functions, you have to call exec(session=> … I guess I learnt something new today. Thanks Serega!