Hi,
i am quiete new on gatling and i try to have a non-shared feed for each session started.
so i was checking the dcumentation and found “flattenMapIntoAttributes”, so a adapt that to my best knowledge and basically it works, BUT
as output in the request I still get
:Map(context → [{id=2,…}]
what i basically understand because I iterate threw an array of maps, but how do i get the real json payload into the request.
I hope i could make myself clear, and i hope somebody can help me out
val scn = scenario(“SendRep”)
.feed(csv("…/devices.csv").circular) //-- remains shared feed
.repeat(nbLoops, “n”) {
val myFeed = jsonFile("/pos.json").records //-- non shared feed
foreach(myFeed, “context”){
exec(flattenMapIntoAttributes("${context}"))
exec(session =>session.set(“timestamp”, getTimestamp()))
.exec(http(“devicerep”)
.post("/devicerep")
.body(ElFileBody(bodyFile)).asJSON
.check(status.is(200)))
}
}