Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting user-defined cookies in Jmeter

Tags:

cookies

jmeter

There doesn't seem to be much information around on forcing Cookie values in JMeter (2.8).

I'd like to be able to set a cookie at the start of a thread (AWS LoadBalancer ID), so that i can select a specific ID each time. The reason for this is that AWS gives the same ELB ID every time unless you change IP. I want to test more than one.

I have tried setting user-defined cookies in the HTTP Cookie Manager without success. (nothing is added)

I have also tried adding a COOKIE_Test to HTTP Header Manager without success. (adds to the header but doesn't treat as cookie)

Might not be possible?

Update: Adding the domain entry fixed it...
On inspecting the normal set-cookie, it omitted the domain, so i did the same...
I guess Cookie Manager ignores and user-defined cookies with null values.

like image 336
stickx Avatar asked Oct 24 '12 02:10

stickx


1 Answers

Adding the domain entry fixed it

On inspecting the normal set-cookie, it omitted the domain, so i did the same...

Cookie Manager ignores any user-defined cookies with null values.

like image 90
stickx Avatar answered Sep 22 '22 07:09

stickx