如何使用JMeter记录JNLP / Java Web Start应用程序 [英] How to record a JNLP/ Java Web Start application with JMeter
问题描述
我需要为JNLP可访问的应用程序进行性能测试。
我使用WireShark并看到jnlp只生成TCP流量。
我阅读了与jnlp perf测试相关的所有帖子,并尝试使用
点击开始按钮启动HTTP(S)测试脚本记录器
JMeter将在jmeter / bin文件夹中生成2种格式的证书颁发机构:
- ApacheJMeterTemporaryRootCA.crt
- ApacheJMeterTemporaryRootCA.usr
keytool -keystore cacerts -importcert -alias jmeter_ca -file< path到jmeter> /bin/ApacheJMeterTemporaryRootCA.crt
- 密钥库密码通常是changeit
- 为信任此证书?输入是问题
参考文献:
-
-
单击网络设置。将打开网络设置对话框。
-
选择使用代理服务器,输入代理服务器名称(localhost)和端口号(JMeter为8888)。
- 单击高级并选中为所有协议使用相同的代理服务器:
- 点击Apply
- 再次重启你的申请
参见参考文献:
-
如果它不是HTTP,则插件不支持它。
I need to do a performance test for JNLP accessible application.
I used WireShark and see that the jnlp generates only TCP traffic.
I read all the post related with jnlp perf testing and I tried with Apache JMeter + UbikLoadPack Java Serialization plugin but jmeter does not capture the traffic.
Is it my only option capture the TCP traffic and work with that ?
Regards, Jaime
If traffic is HTTP(s), as per documentation of UbikLoadPack bundle, You need to follow the instructions of paragraphs:
1/Add JMeter certificate authority to the cacerts file used by Java:
See in documentation "Configuring Application for HTTPS" (Pages 7/8). This will allow your application to work when using JMeter as proxy if traffic is HTTPS
Steps are the following:
- Start JMeter
Use File > Templates... Menu item, then select "Recording" Template and click Create
Start HTTP(S) Test Script Recorder by clicking on Start Button
JMeter will generate a Certificate Authority in 2 formats in jmeter/bin folder:
- ApacheJMeterTemporaryRootCA.crt
- ApacheJMeterTemporaryRootCA.usr
- Find cacerts file used by your system, it should be in JAVA_HOME/jre/lib/security/cacerts
- Run:
keytool -keystore cacerts -importcert -alias jmeter_ca -file <path to jmeter>/bin/ApacheJMeterTemporaryRootCA.crt
- keystore password is usually "changeit"
- enter "yes" for "Trust this certificate?" question
References:
- https://docs.microsoft.com/en-us/azure/java-add-certificate-ca-store
- https://stackoverflow.com/a/11937940/460802
- https://stackoverflow.com/a/8980460/460802
2/To set JMeter as proxy of JNLP:
- Open the Java Control Panel
Click Network Settings. The Network Settings dialog box opens.
Select Use proxy server, enter the proxy server name (localhost), and port number (8888 for JMeter).
- Click Advanced and check "Use same proxy server for all protocols":
- Click Apply - Restart your application again
See reference documentation:
- https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/networking/proxie_config.html
- Force java web start to use a proxy like Fiddler without touching code
If it’s not HTTP, the plugin does not support it.
这篇关于如何使用JMeter记录JNLP / Java Web Start应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!