I’m not sure about what you’re trying to achieve, so I might be wrong, but my first impression is that you’re over-complicating things.
It looks like you’re trying to build a drop down menu, while you should focus on what your virtual users will be sending on the wire.
Are you sure you don’t actually need something much more simple, like List(“CA”, “AL”… “gr”, “uk”…)?
Essentially I’m trying to check that JSON blobs at different endpoints X/us and X/europe, return the correct value. The JSON bits have the following structure:
{
“State”: “California”,
“Abbreviation”: “CA”
}
and I wanted to create a custom feeder that holds a list of all the states/countries and so i would be able to say jsonPath(CONTINENT.state).in(FIRST_LIST) and jsonPath(CONTINENT.state).in(SECOND_LIST). But I don’t know how to get the “us”/ “europe” and each individual list out of the custom feeder.
You won’t be able to use Gatling EL this way, it can only reach top level elements.
I see 2 solutions:
change your custom feeder to Map(“usStates” → List(), “usAbrevations” → List, …) so you only have to level elements and can use Gatling EL
don’t use Gatling EL and pass a lambda instead, such as jsonPath(CONTINENT.state).in(session => session.getTypedAttribute[(List[String], List[String]]._1)
Cheers,