1,jmeter 脚本在win中运行不会报错,然后到linux中运行报错

答案:linux对脚本中的中文解析有问题,将脚本中所有的中文(除:请求中的中文外)均改为英文

2.jmeter Linux下执行控制台不实时打印summary日志

如下问题:

答案:修改配置文件jmeter.properties中的配置项#summariser.ignore_transaction_controller_sample_result=true为summariser.ignore_transaction_controller_sample_result=false

3.jmeter beanshell 报各种语法错误

答案:在确定函数正确的情况,很有可能就是编写的问题,建议重新写一遍。千万:不要质疑语法的错误。

正确的编码如下:

import java.util.Random;
String counts=vars.get("count");
Random x =new Random();
int rand1=x.nextInt(10)+1;
String string2="contractno_"+Integer.valueOf(rand1);
//log.info(vars.get(string2));
vars.put("newcontractno",vars.get(string2));
View Code

 4.BeanShell 的预加载,导致的性能问题

eg:BeanShell PreProcessor 

 

 曾经通过BeanShell PreProcessor 生成uuid数值,

重置解释器为TRUE时,

发现脚本并发能力仅200TPS。
重置解释器设置为false,
发现脚本并发能力仅2000TPS。

千万不要将 重置解释器设置为true;千万不要将 重置解释器设置为true;千万不要将 重置解释器设置为true;

 5.BeanShell PreProcessor作用域的问题

发现在使用BeanShell PreProcessor生成参数时,
不放到某个sampler 下时,该前置处理器将会作用于所有的sampler上面,导致每个sampler中传递的参数值均不相同,
为了能得到相同的参数,且必须使用BeanShell 时,可以使用BeanShell sampler

posted on 2018-09-18 11:57  进_进  阅读(559)  评论(0)    收藏  举报