我一直在努力使 https 请求与 JMeter+Maven 一起工作。 整个场景是 - 启动应用程序 URL > 登录到应用程序(这是 https)> 在主页上(这是 http)
我使用 JMeter 的 HTTP 代理记录了这些测试。然后指定here将采样器的“HTTP请求协议(protocol)”更改为“https”
现在,当我执行测试表单 Maven 时,我遇到以下异常 JMeter 日志 -
2010/09/08 16:25:38 ERROR - jmeter.util.JsseSSLManager: Exception occurred java.lang.NullPointerException
at org.apache.jmeter.util.SSLManager.getKeyStore(SSLManager.java:132)
at org.apache.jmeter.util.JsseSSLManager.getContext(JsseSSLManager.java:141)
at org.apache.jmeter.util.JsseSSLManager.<init>(JsseSSLManager.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.jmeter.util.SSLManager.getInstance(SSLManager.java:231)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.setupConnection(HTTPSampler.java:148)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:404)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:658)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:647)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
at java.lang.Thread.run(Thread.java:619)
2010/09/08 16:25:38 INFO - jmeter.util.JsseSSLManager: JsseSSLManager installed
2010/09/08 16:25:38 WARN - jmeter.protocol.http.sampler.HTTPSampler: You may have forgotten to set the ssl.provider property in jmeter.properties java.lang.IllegalStateException: SSLContextImpl is not initialized
at com.sun.net.ssl.internal.ssl.SSLContextImpl.engineGetSocketFactory(SSLContextImpl.java:145)
at javax.net.ssl.SSLContext.getSocketFactory(SSLContext.java:260)
at com.sun.net.ssl.SSLContextSpiWrapper.engineGetSocketFactory(SSLSecurity.java:365)
at com.sun.net.ssl.SSLContext.getSocketFactory(SSLContext.java:168)
at org.apache.jmeter.util.JsseSSLManager.setContext(JsseSSLManager.java:101)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.setupConnection(HTTPSampler.java:160)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:404)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:658)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:647)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
at java.lang.Thread.run(Thread.java:619)
还有一件事,当我从 JMeter 本身执行这些测试时,我没有遇到任何异常。但是在 Maven 中调用 with 测试会导致这个问题
你们有没有用JMeter+Maven在https上成功执行过测试
提前致谢 塔伦K
最佳答案
JMeter 组建议我使用“jmeter.jar”的更新版本,而不是 JMeter Maven 插件中可用的版本……我将把这个问题标记为已回答并已提交 another query在这方面。
感谢你的黑色时光
~T
关于maven-2 - 使用 JMeter + Maven 和 https 协议(protocol),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3667046/