maven-2 - 使用 JMeter + Maven 和 https 协议(protocol)

标签 maven-2 ssl-certificate jmeter

我一直在努力使 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/

相关文章:

java - 使用 Cassandra JMeter 时无响应数据

java - 使用 maven2 删除嵌套的测试类

security - 什么是有效的 SSL 证书通用名称?

java - 如何更改 keystore 中 key 的别名?

java - SSL套接字服务器在握手后获取证书cn

security - SSL 客户端如何验证服务器的证书?

jmeter - jmeter中通过beanshell执行shell命令

http - JMeter 中的条件响应断言

maven-2 - 如何强制maven每天更新依赖的版本?

java - 如何从 Maven 项目外部链接源并使用该链接源进行进一步开发。