Removing session cookies and

1,067 views
Skip to first unread message

Magnus Jensen

unread,
Jun 8, 2015, 7:44:16 AM6/8/15
to gat...@googlegroups.com
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?

Cheers


Pierre DAL-PRA

unread,
Jun 8, 2015, 7:47:13 AM6/8/15
to gat...@googlegroups.com
The documentation is your friend : http://gatling.io/docs/2.1.6/http/http_helpers.html

--
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.
For more options, visit https://groups.google.com/d/optout.

Magnus Jensen

unread,
Jun 17, 2015, 6:02:11 AM6/17/15
to gat...@googlegroups.com
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?

Dmitry Andrianov

unread,
Jun 17, 2015, 5:15:58 PM6/17/15
to gat...@googlegroups.com

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) :)

Cheers

Pierre DAL-PRA

unread,
Jun 17, 2015, 5:43:19 PM6/17/15
to gat...@googlegroups.com
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.

Cheers,

Pierre
Reply all
Reply to author
Forward
0 new messages