feed(feeder, Int) deprecated, alternative?

Hello everyone,

I would like to feed multiple records to my scenario like it was described in

https://gatling.io/docs/gatling/reference/3.6/session/feeder/
“You can also feed multiple records all at once. If so, attribute names, will be suffixed. For example, if the columns are named “foo” and “bar” and you’re feeding 2 records at once, you’ll get “foo1”, “bar1”, “foo2” and “bar2” session attributes.”

This feature seems to be removed according to https://gatling.io/docs/gatling/reference/current/upgrading/3.6-to-3.7/
“feed(feeder, Int) is deprecated for removal and is no longer documented.”

is there a convenient solution for this problem?

kind regards

David

1 Like

I really don’t like this name translation.
IMHO, if we were to reintroduce a similar feature, we should inject Seqs so you would do foo(0), foo(1), get(0), get(1).

Then, I’d like some feedback on how many users actually use this feature.

Is there a workaround with the current version how to obtain multiple records?
I’m quit stuck at the moment.

The feature is still there in the Scala DSL, it’s just not documented.

I’m using the java API it seems that the feature is already removed there :confused:

Then it’s not been removed, it hasn’t been introduced :slight_smile:
You can do the translation yourself:

feed(feeder)
.exec( session → session.set(“foo1”, session.getString(“foo”))

.feed(feeder)
.exec( session → session.set(“foo2”, session.getString(“foo”))

.feed(feeder)
.exec( session → session.set(“foo3”, session.getString(“foo”))

1 Like

OMG thank you it worked. You saved my day :slight_smile: Already had my head banging against my keyboard :smiley:

FYI: Core: revamp feed(???, Int) to produce arrays [BREAKING] · Issue #4226 · gatling/gatling · GitHub