首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过https协议使用JMeter +maven.

通过https协议使用JMeter +maven.
EN

Stack Overflow用户
提问于 2010-09-08 19:08:11
回答 2查看 2.2K关注 0票数 3

我一直在努力让https请求与JMeter+Maven协同工作。整个场景是-启动应用程序URL >登录到应用程序(这是https) >在主页上(这是http)

我使用JMeter的HTTP Proxy记录了这些测试。然后根据指定的here将采样器的"HTTP request protocol“更改为"https”。

现在,当我执行测试表单Maven时,我遇到了以下异常JMeter日志-

代码语言:javascript
复制
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中调用test from with会导致这个问题

你们有没有用JMeter+Maven在https上成功执行过测试?

提前感谢Tarun K

EN

回答 2

Stack Overflow用户

发布于 2010-09-12 01:10:46

JMeter小组建议我使用"jmeter.jar“的更新版本,而不是JMeter Maven插件中提供的版本。我将这个问题标记为已回答,并在这方面提交了another query

感谢你抽出时间,布莱克

~T

票数 0
EN

Stack Overflow用户

发布于 2013-10-01 03:17:05

我可以用maven和https通过jemter测试,尝试使用keytool将证书添加到server.xml所指向的cacerts中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3667046

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档