如何使用Jmeter一次登录多个用户

如何使用Jmeter一次登录多个用户,jmeter,Jmeter,我已经附上了Http请求和CSV数据配置的截图。请检查并让我知道我在哪里出错 运行此脚本时,我得到以下响应 java.net.URISyntaxException: Illegal character in fragment at index 89: http://letsbac.colanonline.net/#/login?inputUsername=msinghzx4&inputPassword=A12345b&Sign In=submit at java.net.URI$

我已经附上了Http请求和CSV数据配置的截图。请检查并让我知道我在哪里出错

运行此脚本时,我得到以下响应

java.net.URISyntaxException: Illegal character in fragment at index 89: http://letsbac.colanonline.net/#/login?inputUsername=msinghzx4&inputPassword=A12345b&Sign In=submit
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at java.net.URL.toURI(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:399)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
at java.lang.Thread.run(Unknown Source)
java.net.URISyntaxException:索引89处片段中的非法字符:http://letsbac.colanonline.net/#/login?inputUsername=msinghzx4&inputPassword=A12345b&Sign In=提交
在java.net.URI$Parser.fail处(未知源)
位于java.net.URI$Parser.checkChars(未知源)
位于java.net.URI$Parser.parse(未知源)
位于java.net.URI。(未知源)
位于java.net.URL.toURI(未知源)
位于org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:399)
位于org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
位于org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
位于org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
位于org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
位于org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
位于org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
位于java.lang.Thread.run(未知源)

  • 您需要勾选
    Encode
    框,其中
    Sign-In
    参数为,或者将
    Sign-In
    更改为
    Sign%20In
    ,因为URL中需要使用特殊字符
  • 我怀疑您是否使用了正确的方法,我的期望是您应该在方法下拉列表中使用
    POST

  • 构建正确请求的最简单方法是记录它,因为您的测试计划在我看来不太现实,因为我的期望是真正的用户宁愿先打开登录页面,然后执行登录。i、 e.当您只有1个请求时,至少有2个请求

  • 根据JMeTM最佳实践,您应该总是使用JMIT的最新版本,所以考虑升级到下一个可用的机会
    您的参数名是否真的是带空格的
    登录
    ?谢谢。我刚刚点击了编码,它工作得很好。现在我可以登录了。登录后,我需要执行一些操作,如投票,喜欢和不喜欢,就像我们在twitter上做的一样。请帮助我如何才能做到这一点。