cookies - JMeter - Using Variables in CookieManager? -
i have been reading can find on cookiemanager , jmeter variables , properties , can't seem working or if work.
what want able set cookie want use on command line and/or .properties file.
inside cookie manager have manually added 1 cookie so:
cookiemanager: name | value | domain | path ------+----------------------+---------------+-------- myid | ${__p(mycookie.var)} | mydomain.com | / then, tried pass value "mycookie.var" on cli using:
-j "mycookie.var=srv1" to set cookie "myid", when run case cookie set 'null'...
when above did not work tried adding user defined variables element test plan. added 1 variable name = "myvar", , value set value = "${__p(mycookie.var)}". then, in cookiemanager set as:
cookiemanager: name | value | domain | path ------+----------+---------------+------- myid | ${myvar} | mydomain.com | /
so, after running test plan , checking variables in beanshell can see user-defined variable "myvar" receiving variable pass on command-line, cookie "myid" still being set 'null'...
are cookie managers allowed use variables cookie's value?
thanks in advance,
matt
i tried in jmeter using user defined variables.- able substitute user defined variables in cookie manager.
it can work fine properties too. pass them given below in command line option
-jpropname=propvalue
so, in case, should -jmycookie.var=srv1 (no space , no ").
access using ${__p(mycookie.var)}. should work.



Comments
Post a Comment