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

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

 

jmeter响应代码为乱码

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。(记住去掉#,不要还是注释状态哦)

 

相关文章:

  • 2021-06-28
  • 2021-10-06
  • 2021-12-11
  • 2022-03-10
  • 2021-06-20
猜你喜欢
  • 2021-04-05
  • 2021-09-02
  • 2022-01-15
  • 2021-09-12
  • 2021-08-06
  • 2021-09-21
相关资源
相似解决方案