jmeter,view results tree 中response data里面的中文乱码
利用badboy录制我们公司网站的登录过程,导出为.jmx文件后在jmeter中运行,在view results tree中发现response data里面的中文乱码,sampler result中的dataEncoding :null。
尝试过的方法有如下2种(但是都无效):
1.jmeter.properties中sampleresult.default.encoding=UTF-8
2.http request中content encoding设为UTF-8
PS:尝试过录制其它网站(如126邮箱,360云盘),response data中中文显示正常。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已解决,主要原因是自己的jmeter版本太老,使用的是前测试员下载的jmeter2.6,重新下载了jmeter2.11.同时修改并取消注释:jmeter.properties中
The encoding to be used if none is provided(default UTF-8)
sampleresult.default.encoding=UTF-8
之前只有本公司网站中文乱码的原因是因为少了
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
而测试的其它网站都有
<meta charset=utf-8>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
听程序员说<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
在HTML5中不需要,这么写只是为了兼容一些老的浏览器