I'm trying to save some seq in static variable and then make http get for each value of the seq:
.exec { session =>
residents = session("residents").as[String]
.split(",").toSeq
.map(f => f.replaceAll("\"", ""))
session
}
.foreach(residents, "resident") {
exec(http("resident").get("#{resident}"))
}
Each element of seq is http url.
Is it possible to send http requests dynamically in Gatling depends on count of seq elements? How can I do this beacuse this code doesn't work as I expect.
That's not how Gatling works. Your residents mutable reference is:
foreachactionYou've pulled
residentsfrom the current user'sSession, you must stay in this scope: