How do I pass cookies ai-user & ai_session as a dynamic variable to UserSessionid & AppSessionid in JMeter?

104 Views Asked by At

I want to know how to make UserSessionid & AppSessionid values dynamic. Kindy give me solution. As I want to pass variable as a value to UserSession & AppSession in Http sampler request header, from which response I get those values? So I can get value and pass.

1

There are 1 best solutions below

0
Dmitri T On
  1. Add the next line to user.properties file (lives in "bin" folder of your JMeter installation)

    CookieManager.save.cookies=true
    
  2. Restart JMeter to pick up the change

  3. Add HTTP Cookie Manager to your Test Plan

  4. That's it, now you should be able to refer the cookies from the HTTP Cookie Manager as ${COOKIE_UserSession} and ${COOKIE_AppSession} where required

More information: