I’m an absolute rookie here (JAVA i mean), spent hours looking for a solution, now i just want to shoot myself.
I want to create a string in the beanshell assertion which is placed right above the HTTP Request.
-
In the beanshell i wrote:
String docid="abcd";(in actuality i wish to concatenate a string with some variables)
-
In HTTP Request, send parameters i add
${docid}.
In BeanShell Assertion description section you can find the following:
So to set jmeter variable in beanshell code (BeanShell Assertion sampler in your case) use the following:
or simply
and then you can refer it as ${docid}, as you’ve done in your HTTP Request.