jmeter 默认的编码是ISO-8859-1,无法表示中文字符。如果系统采用的编码与jmeter编码不一致,中文字符就会显示乱码。
request 请求中中文显示乱码
解决方案:在http请求配置中content encoding设置为utf-8
response 响应中存在乱码
解决方案一:
在线程组上右键添加---后置处理器---BeanShell PostProcessor
在Script中填写prev.setDataEncoding("UTF-8"),
保存后重新运行响应结果中文显示正常。
解决方案二:
进入jmeter/bin目录下,打开文件jmeter.properties、搜索default.encoding
'''#sampleresult.default.encoding=ISO-8859-1 去掉注释、把ISO-8859-1修改成UTF-8,保存后重启jmeter, 再次运行ok