0

While recording I can see the all cookies are stored in the request headers as JSESSIONID=71fc7095-b591-4106-b904-9f5XXXXX58c3; _uid=user-5664708212484720511; oxy_lang=en_US; test-cookie=test; rsession-key=dvQ2PWXXXXXXXXXXm52E3; ALFRESCO_REMEMBER_ME=1

But when I am replying the script, it is not pulling all the cookies to the request. I am getting only few cookies as below.

Cookie Data: JSESSIONID=dd043e4f-e740-4677-a578-65XXXXXcd029; _uid=user511841202XXXXX5292

How can I retrieve all cookies ?

Note: I added HTTP Cookie Manager to the test plan and changed the configuration in JMeter properties file as CookieManager.save.cookies=true

1 Answer 1

1

HTTP Cookie Manager should automatically add the cookies in case if they're valid, to wit:

  • domain and path of the next request match the ones in the cookie
  • cookie is not expired
  • protocol matches cookie's secure attribute

So if JMeter doesn't send all the cookies most probably the system under test is not properly configured.

If you're absolutely sure that your system under test is okay you can do the following:

  • Choose less restrictive implementation in the HTTP Cookie Manager, i.e. netscape

    enter image description here

  • add the next line to user.properties file:

    CookieManager.check.cookies=false
    

More information:

3
  • My I know what is meant by " the system under test is not properly configured."
    – RS Ganesh
    Feb 16, 2023 at 12:03
  • Please suggest what corrections I need to make ?
    – RS Ganesh
    Feb 17, 2023 at 6:23
  • Excellent answer.
    – dzieciou
    Nov 13, 2023 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.