Best approach to posting big forms with varying data

Hello!

I’m very new to Scala and Gatling as I was assigned to stress testing last week, so bear with me. I’m testing an older application that at certain points posts forms that are on the bigger side (~200 records). Now, in the tests I need to post these forms with different values each time so I was thinking it would be a good choice to use a JsonFile feeder. Is there a way to put a whole json object in, say formParamMap, so I don’t need to separately pick every single value from the feeder?

Here’s what my feeder.json file looks like:

[
{
“params” : {
“record1”:“info1”,
“record2”:“info2”,
“record3”:“info3”,
“record4”:“info4”,
“record5”:“info5”,
… a lot more of this
}
},
{
“params” : {
… same here
}
}
]

Tried with something like the following code:

val myFeeder = jsonFile(“feeder.json”).circular

val scenario = exec(http(“Big form page”)

.get("/bigForm/page))
.pause(5)
.feed(myFeeder)

.exec(http(“Huge form”)
.post("/my/url")

.formParamMap("${params}")

And the error I get in simulation.log:

GROUP Failed to build request Huge form: Can’t cast value {record1=info1, record2=info2, record3=info3, and so on…} of type class java.util.LinkedHashMap into interface scala.collection.immutable.Map

What do you think would be the best approach in posting big forms with varying data?

Just filled a feature request: https://github.com/gatling/gatling/issues/3053