Need to extract session_id from session info

35 views
Skip to first unread message

gatling...@gmail.com

unread,
Dec 5, 2017, 12:29:44 PM12/5/17
to Gatling User Group
I am unable to extract the session_id from this session info. I can extract everything else without issue. I am guessing a syntax or improper way of addressing it. Here is the session info. I want to extract the value in red. Any help is appreciated. Thank you!!!

Session: Session(Users,1,Map(gatling.http.cache.dns -> io.gatling.http.resolver.ShuffleJdkNameResolver@4c975e5e, gatling.http.cache.contentCache -> io.gatling.core.util.cache.Cache@581fc790, GetText -> Leukemia is cancer, gatling.http.cache.redirects -> io.gatling.core.util.cache.Cache@3ecdad7a, 6435007a-dbda-4948-ab81-93296f48dce0 -> 1, searchCriterion -> Leukemia, gatling.http.referer -> https://search.nih.gov/search?utf8=%E2%9C%93&affiliate=nih&query=Leukemia&commit=Search, gatling.http.cookies -> CookieJar(Map(CookieKey(_session_id,search.nih.gov,/) -> StoredCookie(_session_id=424eda01c7a7240a02921f8fb8597435; path=/; secure; HTTPOnly,true,false,1512491440330), CookieKey(request_method,search.nih.gov,/) -> StoredCookie(request_method=GET; path=/; secure,true,false,1512491440330)))),1512491435546,19,KO,List(ExitOnCompleteLoopBlock(6435007a-dbda-4948-ab81-93296f48dce0)),io.gatling.core.protocol.ProtocolComponentsRegistry$$Lambda$449/906347731@122576c8)

Stephen

unread,
Dec 5, 2017, 3:16:57 PM12/5/17
to Gatling User Group
Hello,

Since you are trying to get the value of a cookie, I suggest you to have a look a this post: https://groups.google.com/forum/#!topic/gatling/OWVVoWMsFd0

Stephen

Adam Artajew

unread,
Dec 6, 2017, 3:45:54 PM12/6/17
to Gatling User Group
Or see here the helper class for extracting cookie by name from the cookie jar:

Good luck!
Reply all
Reply to author
Forward
0 new messages