I have been reading just about everything I can find on CookieManager and JMeter Variables and Properties and I just can't seem to get it working or if this will even work.
What I want to do is to be able to set the Cookie i want to use on the Command Line and/or from a .properties file.
Inside my Cookie Manager I have manually added one Cookie like so:
CookieManager:
NAME | VALUE | DOMAIN | PATH
------+----------------------+---------------+--------
MYID | ${__P(myCookie.var)} | mydomain.com | /
Then, what I tried to do was pass a value for "myCookie.var" on the CLI using:
-J "myCookie.var=srv1"
to set the Cookie "MYID", but when I run the case the Cookie is set to 'null'...
When the above did NOT work I tried adding a User Defined Variables element to the Test Plan. I added one variable with NAME = "myVar", and the value set to VALUE = "${__P(myCookie.var)}". Then, in the CookieManager I set it as:
CookieManager:
NAME | VALUE | DOMAIN | PATH
------+----------+---------------+-------
MYID | ${myVar} | mydomain.com | /
So, after running my Test Plan and checking the variables in a BeanShell I can see that the User-Defined Variable "myVar" is receiving the variable I pass on the Command-Line, but the Cookie "MYID" is still being set to 'null'...
Are Cookie Managers allowed to use variables as the Cookie's VALUE?
Thanks in Advance,
Matt