Here is what I NEED to do:
.feed("users.csv") // includes username, password, groupid
// login...
.duration(x) {
feed( csv("${groupid}.csv").random )
// interact with the application using the data in the second .csv file
}
But of course, the csv() function takes a string, not an EL expression. I need to be able to compose that string at the appropriate moment in the scenario execution.
I am able to build the string, like so:
.exec( session => {
feed( csv( session.getAttribute("groupid") + ".csv" ).random )
session
})
But unfortunately, the following execs don't see the data. It looks like some kind of scoping issue to me. I'm guessing the feed() expression is doing exactly what it is supposed to be doing, but because it is not part of the outer chain, it's not being placed where it belongs. Am I supposed to be calling .feed on some object within the session object in order to attach it to the ongoing chain?
Any guidance on how to accomplish what I have set out to do? Thanks!