jmeter响应代码为乱码

1.在请求的前面添加BeanShell PostProcessor

输入prev.setDataEncoding("UTF-8");

 

2.当响应数据或响应页面没有设置编码时,jmeter会按照jmeter.properties文件中,sampleresult.default.encoding设置的格式解析

默认ISO-8859-1,解析中文肯定出错

 
  1. # The encoding to be used if none is provided (default ISO-8859-1)  
  2. #sampleresult.default.encoding=ISO-8859-直接修改sampleresult.default.encoding=UTF-8。(记住去掉#,不要还是注释状态哦)

 

直接修改sampleresult.default.encoding=UTF-8。(记住去掉#,不要还是注释状态哦)

 

posted @ 2018-06-28 13:39  yye_2010  阅读(128)  评论(0编辑  收藏  举报