Hi,
I’m building a scenario which discovers its next steps from the responses. I’m stuck at using session directly; a following is a simplified example:
scenario("test") .exec { http("get first").get("/first").check(bodyString.transform{ bs => //json parsing using play-json, jsonPath did not seem exactly convenient for complex transformation val theMap: Map[String,Seq[String]] = ... //this is the signature I want and get theMap }.saveAs("theMap")) }.exec { session => val theMap = session("theMap").as[Map[String,Seq[String]]] val requests = theMap("second").map { id => http(s"get $id").get(s"/$id")) } http("whatever").resources(requests:_*) //yes, I really really really need to fetch all of these requests in parallel session }
Now, what happens is that no request is emitted in the second exec; I guess it’s because I’m returning session and hence the requests are kinda side effect.
How can I achieve what I want? What am I missing here?
Thanks,
Zdenek