Jmeter 参数未编码异常:java.net.URISyntaxException: Illegal character in query at index 172

最近在使用jmeter进行测试时,每次回放时,都回放失败,查看response data 提示:java.net.URISyntaxException: Illegal character in query at index 172 的异常信息。如下:

java.net.URISyntaxException: Illegal character in query at index 172: http://www.xxxx.com/discuz/images/default/right_big.gif?

Accept=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8&Accept-Encoding=gzip, deflate, br&Accept-Language=zh-CN%2Czh%3Bq%3D0.9&User-Agent=Mozilla%2F5.0+%28Windows+NT+6.1%3B+WOW64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F63.0.3239.132+Safari%2F537.36&pO5_auth=a7d6J%2FoHPxe6UU9y6yFwV8R0WOiULiyRs8HKRwtiwdG3Za46e3H0TJySLFHtL3NLqsW4k%2FepaHLkIFGA7kNsr2w

仔细查看参数,发现请求的参数都是以明码的形式发送。

解决方法:在将勾选参数后面的:encode(先编码在发送请求)

再次运行,即可运行通过,如下图:

 

posted @ 2019-01-08 22:53  西夏一品唐  阅读(9262)  评论(0编辑  收藏  举报