Use function to create values for feeder?

Hello everyone,

I’m wondering if gatling is supporting calling function to create feed data, for example I need to dynamically create entity ids so I would like to do something like this:

val i = 0
val myFeeder = (e) => {return “id” + i++}
scenario()
.feed(myFeeder)
.exec(…)

No, not a function.
If you take some time to have a look at the documention
<https://gatling.io/docs/current/session/feeder/>, you'll see that Feeder
is an alias for Iterator[Map[String, T]].
An Iterator has to methods: next and hasNext while a function is similar to
one single method.
And you must returns Maps, not a String.

[image: Logo] <https://gatling.io>
*Stéphane Landelle**Chief Technical Officer*
twitter: @slandelle <https://twitter.com/slandelle>
site: gatling.io