BeanShell PreProcessor 引用 用户参数(用户定义的变量) 中参数的用法

1、以用户参数为例


2、常用的知道咱们在直接用的时候是${userno},所以在BeanShell PreProcessor 中


但是这个时候报错了,


,所以尝试了另一种方法,java中的object.get(String Key),Jmeter中的object是vars。

String userno1 = vars.get("userno");

vars.put("test",userno1)



这个办法成功了

之后去修改了一下,后来发现

/*String userno1 = ${userno}+"";*/

vars.put("test",userno1)

这种方法也是可以成功的



猜你喜欢

转载自blog.csdn.net/xpf094/article/details/80737081