51Testing软件测试论坛

标题: jmeter线程报错 [打印本页]

作者: 测试积点老人    时间: 2022-1-6 10:02
标题: jmeter线程报错
问题遇到的现象和发生背景

启动线程后报错

问题相关代码,请勿粘贴截图
  1. <span style="font-weight: normal;">java.net.URISyntaxException: Illegal character in query at index 66: http://live-web.aixuexi.com/uapi/room/entry?appId=1000008&expire=${expire}&random=1000001&requestId=${requestId}&role=12&liveId=${live}&roomId=${room}&tokenExpire=${tokenExpire}&userFlag=${userFlag}&userGroup=all&sign=${md5sign}&userName=app%C3%91%C2%A7%C3%89%C3%BA&isApp=1
  2. at java.net.URI$Parser.fail(Unknown Source)
  3. at java.net.URI$Parser.checkChars(Unknown Source)
  4. at java.net.URI$Parser.parseHierarchical(Unknown Source)
  5. at java.net.URI$Parser.parse(Unknown Source)
  6. at java.net.URI.(Unknown Source)
  7. at java.net.URL.toURI(Unknown Source)
  8. at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:620)
  9. at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
  10. at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1296)
  11. at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1285)
  12. at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638)
  13. at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
  14. at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
  15. at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
  16. at java.lang.Thread.run(Unknown Source)</span>
复制代码
运行结果及报错内容我的解答思路和尝试过的方法

想让它得到正常数据库返回的结果

我想要达到的结果

作者: 海海豚    时间: 2022-1-7 09:13
可能的原因是URL中带空格导致服务器端无法正确识别URL,需要去掉URL中的空格。
作者: qqq911    时间: 2022-1-7 13:10
请求中内容格式错误




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2