1、使用jmeter中的配置元件‘HTTP请求默认值’时,协议框里面写的https,但是运行时报如下错误:
java.net.MalformedURLException: unknown protocol: https
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.getUrl(HTTPSamplerBase.java:1120)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1296)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1285)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
at java.lang.Thread.run(Unknown Source)
解决:检查发现在单独的请求协议框中带上'https'后能正常请求,删除后再次报错,再次检查配置元件‘HTTP请求默认值’中的协议框,发现‘https’的前面多了一个空格键,删除空格后恢复正常。
2、jmeter中配置元件‘HTTP请求默认值’和‘用户定义的变量’执行顺序为:
优先执行‘HTTP请求默认值’中的变量参数,后执行‘用户定义的变量’中的变量参数,如果有重合的变量名则会覆盖前面‘HTTP请求默认值’中的变量参数后发出请求。
?
?
|