Can't see all response header cookies in jmeter

Viewed 21

I am trying to load test an application which uses azure AD B2C authentication. I have replicated all requests. However there is authorize endpoint which when inspected in browser I can see few cookies from response header. This has openidconnect cookie, another couple of cookies. However when running this request in jmeter, I can see only openidconnect cookie but not others.

I need to send other cookies in subsequent request. I have cookie manager and also turned on save cookie flag in user.properties and jmeter.properties files.

Any help is much appreciated.

1 Answers

Most probably it indicates some problem with cookies, i.e. domain/path mismatch or the cookie is expired or something like this so it sounds like your system under test issue.

If you don't care about correctness of functional behaviour of your application and just want to send all the incoming cookies no matter of their validity - you can try the following workarounds:

  1. Disable JMeter's mechanism for checking cookies so everything will be stored in the Cookie Manager no matter if there are any issues. It can be done by adding the next line to user.properties file:

    CookieManager.check.cookies=false
    
  2. Switch to less restrictive implementation, i.e. netscape in the HTTP Cookie Manager itself:

    enter image description here

More information: HTTP Cookie Manager Advanced Usage - A Guide

You can also enable debug logging for the Cookie Manager by adding the next line to log4j2.xml file:

<Logger name="org.apache.jmeter.protocol.http.control" level="debug" />

once done you will be able to see what's going on with each and every incoming/outgoing cookie in jmeter.log file

Related