Reputation: 12601
Is it possible to implement a gatling test with multiple clients? Example: The first client gets a key which is communicated to the second client. That key is then used until the second client is finished and the first client can then proceed and check to see the result.
Cookies are the problem why I'm having troubles implementing this as a single client posing as two separate. The clients must have different set of cookies.
Alternatively; can I hold and reinsert the cookies for the first client?
Upvotes: 0
Views: 159
Reputation: 12601
I was able to circumvent the problem be storing and restoring the whole cookie jar like this:
val builder = scenario("Thingies")
... do some first client stuff
.exec(session => {
session.set("first-session-cookies",
session("gatling.http.cookies").as[CookieJar])
})
... do some second client stuff
.exec(session => {
session.set("gatling.http.cookies",
session("first-session-cookies").as[CookieJar])
})
... back to first client stuff
Works like a charm :-)
Upvotes: 0