jemter返回结果中文乱码

如图,返回的结果,中文出现乱码

 对于这个问题有两种解决方法

第一种:修改jemeter文件,需要重启jemter

bin 目录下,找到  jmeter.properties  这个文件,修改编码格式,修改完后需要重启 jemter

# jemeter  v5.31085
# 修改前 # The encoding to be used
if none is provided (default ISO-8859-1) #sampleresult.default.encoding=ISO-8859-1

# 修改后
# The encoding to be used if none is provided (default ISO-8859-1)
sampleresult.default.encoding=utf-8
 

第二种:添加后置处理器 BeanShell PostProcessor ,设置编码为 utf-8

# 在script 脚本框中输入

prev.setDataEncoding("utf-8");

                                

  

原文地址:https://www.cnblogs.com/shiyixirui/p/13084526.html