新建beanshell sampler
脚本框中键入脚本如下:
[java]
view plain
copy
result =
"\n1:"+bsh.args[
0]+
"\n"; result+=
"2:${testBeanshell}\n" result+=
"3:"+vars.get(
"testBeanshell"); vars.put(
"testBeanshell",
"beanshell_change"); result+=
"\n4:${testBeanshell}" result+=
"\n5:"+vars.get(
"testBeanshell"); ResponseCode =
500; ResponseMessage =
"test ok!!"; IsSuccess =
true; log.info(
"\nlog test:"+result); SampleResult.setResponseData(
"SampleResult:"+result+
"\n");
return "return:"+result;
附图和步骤
1.构建测试计划
2.新建用户变量
3.结果展示
转载请注明原文地址: https://ju.6miu.com/read-1310877.html