4
votes

After reading documentation and posts in Internet I still cannot solve the problem with Cookie Manager in jMeter. I got sid ID in response header but it is not stored in my cookies manager. Below are the screens of my test plan and response with connect.sid

Could you help to figure out what is wrong?

Response with cookie

Cookie is not stored

1
you got something in your output log (red "1" near the yellow triangle with exclamation point in the top right corner of JMeter UI) - could you please reveal it?Yuri G

1 Answers

3
votes

In order to be handled by JMeter (and web browsers as well) your cookie needs to be compliant with some policies i.e. domain and path should not clash with the current URL, expiration date should not be in the past (your cookie expiration date is 20:33, looking into the time at your machine you have 23:21), etc.

Also your set-cookie header name looks suspicious, I used to see it with first capital letters like Set-Cookie

Suggestions:

  1. Try out different "Cookie Policy" options:

    HTTP Cookie Manager Cookie Policy

  2. Add the next line to user.properties file (lives in JMeter's "bin" folder)

    CookieManager.check.cookies=false
    
  3. Points 2 and 3 don't help you can get some extra information by enabling debugging output by adding the next line to the aforementioned user.properties file:

    log_level.jmeter.protocol.http.control=DEBUG
    

    and look into jmeter.log file for anything connected with CookieManager, HC4CookieHandler or HC3CookieHandler


As a last resort you can always get any cookie value using Regular Expression Extractor, the relevant configuration would be something like:

JMeter Regular Expression Extract Cookie