Dynamically build all requests from a csv

I can build all of each http request in a scenario by using flattenMapToAttributes and using session attributes as EL in the request path and query parameters. But I have parts of that data that contains IDs. I want to feed different IDs into the requests for each virtual user.

Does anyone have ideas on how that could be done? I can't see any way to change anything on the requests after I set the values with data from the session attributes I get from flattenMapToAttributes.

Thanks for any suggestions!

Hello Mike,
Can you pls provide some code snippets ? will see what I can do

Sujin Sam

Hi Sujin Sam. Thanks for the reply. This is the sort of code I’m thinking of using where I’d have each part of a url other than the baseUrl as columns in a CSV:

val urlRecords = csv(“url.csv”)
val scnSearch =
.exec(foreach(urlRecords.records, “urlRecord”) {

The problem is that I’d also like to use a feeder to replace parts of the session attributes I get from the CSV. For example, if a value in the CSV is something like:

I would like to change it so the CSV contains something like this:

When the record is used for each virtual user, I want to feed in a new value for personId.

It’s not possible: Gatling EL only works one level deep. You can’t have expressions in expressions.