Reputation: 15
I am new to JMeter and stuck in this issue, As we hit auth page two cookies have been created which are attached to all requests further. My few requests are failing as they are not getting these cookies in their request body. Kindly check the attached images cookies created at -32 need to be appended in the request -57. Please help me to pass these cookies to that request.
Upvotes: 0
Views: 667
Reputation: 168147
As per Functions and Variables chapter of JMeter Documentation:
Properties are not the same as variables. Variables are local to a thread; properties are common to all threads, and need to be referenced using the __P or __property function.
So JMeter's HTTP Cookie Manager stores cookies for each thread (virtual user) and they're not available in the other threads even in the same Thread Group and for some reason you have several Thread Groups.
The easiest solution is moving all the requests so they would be under the same Thread Group and placing your "login" samplers under the Once Only Controller
If for some reason you want to continue with your current test design (although it doesn't look good to me) you will need to:
It can be accomplished using JSR223 Test Elements and Groovy language
Upvotes: 1