Removing session cookies and

I have a webpage that requires me to log in twice if I clear all cookies (session and regular). If I clear cookies/all history using firebug before I record the traffic I get a http 401 and a redirect to another web-page with an additional login.
However if I do not clear the web history I get a http 200 on the first request and not the redirect.

What I want to do is to clear "all the web content (cookies+++) for every virtual user.

Any gatling support for this?


The documentation is your friend :

Using both exec(flushHttpCache) and (flushCookieJar) does not remove all the cookies and chatted thing I need to remove.
If I use i.e. “click & clean” firefox “Add-on” I get to remove the thing I would like, but not by using (flushHttpCache) and (flushCookieJar). Then I do not get a “fresh” browser that I need.
Any other .exec I can call to totally empty every trace of the v-user?

I did this and it worked:

.exec((session: Session) => {
  session.set("gatling.http.cookies", CookieJar(Map.empty))

however I did it only because I did not read the docs and did not know I can do exec(flushCookieJar) :slight_smile:


If there’s anything else in the session that you want to remove, you can always look for what remains in the session and remove it yourself.