Hi!
it looks like if I try to do this multiple times it does not save anything?
saveAs
should save your last result.
Are you sure that your last result is not empty?
would like to save each response somehow in a list
My approach is:
acc
) with an empty listtmp
)Something like:
.exec(session => session.set("acc", session("acc").as[List[String]] :+ session("tmp").as[String])
(warning: not tested)
I hope that helps!
Cheers!
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/048db3b8-a292-4750-a264-8adef9d39d66n%40googlegroups.com.
Hmm ya that doesn’t seem to be working. But I’m not sure I initiated the list correctly? Is this how you would to create a session variable ( resourceUidList ) with an empty list (couldn’t find anything in the doc about this)?
.exec(session => session.set("resourceUidList", {}))
If that is correct.. it doesnt seem to work when I try to add to it like so
exec(session => session.set("resourceUidList", session("resourceUidList").as[List[String]] :+ session("resourceUid").as[String]))
the session var is empty
resourceUidList -> ()
What I would like to do is take this list and iterate each value to a PUT request.
Another way I could do that is I add all the resourceIds to a local array variable (not is session)
Then I can iterate over using repeat
repeat(times, counterName) {
myChain
}
according to the docs times can be an Int,
so my code looks like this
.repeat(numberOfRulesets, "counter") {
TestUtil.putRuleset("${rulesetId}", rulesetFilePath, "${counter}").pause(2) // This is my PUT request
}
However it does not seem like this counter is working? Not sure what I am doing wrong but it seems unable to get that value to index on my array.
please let me know if you see anything incorrect about either option thanks!?
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/019f5a0f-9277-49f0-97db-4cd24fa949b6n%40googlegroups.com.