JMeter java.net.URISyntaxException:Illegalcharacterinquery解决方案
java.net.URISyntaxException: Illegal character in query解决方案
by:授客 QQ:1033553122
测试环境
apache-jmeter-3.2
1. 问题描述
如下,jmeter发送get参数,参数中携带字符 {},运行后查看请求响应结果,提示如下:
java.net.URISyntaxException: Illegal character in query at index 59:http://xx.xxx.xx.xx:1301/xxxx/xxx/uploadRecords?records=[{}]
at
at
at
at
at
at
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.
at
2. 解决方法
勾选参数右侧的“编码?”,对参数进行url编码
作者:授客
微信/QQ:1033553122
全国软件测试QQ交流群:7156436
Git地址:https://gitee.com/ishouke
友情提示:限于时间仓促,文中可能存在错误,欢迎指正、评论!
作者五行缺钱,如果觉得文章对您有帮助,请扫描下边的二维码打赏作者,金额随意,您的支持将是我继续创作的源动力,打赏后如有任何疑问,请联系我!!!
微信打赏
支付宝打赏 全国软件测试交流QQ群