I need to run Jmeter programmatically using Java from behind a proxy. The problem lies in the fact I need to do it using HTTPS .
I have read the manual at: http://jmeter.apache.org/usermanual/get-started.html I have using Jmeter for a few months now and feel comfortable with it but the problem started when I needed to switch to HTTPS.
I have tried the following: (both separately and all together)
- Added a HTTP Request Defaults configuration with the proxy server details
- Added the proxy server details to each HTTP Request
- Added both https.proxyHost & https.proxyPort with the proxy server details to the system.properties file found at ...\apache-jmeter-3.1\bin
I am aware of the fact that I can run JMETER using the command line with -H -P as parameters (That works) but that isn't how I work with JMeter - I only use it programmatically therefore this is not an option.
This is a snippet describing a known JAVA bug related to my problem:
The Java HTTP implementation has some limitations: There is no control over how connections are re-used. When a connection is >released by JMeter, it may or may not be re-used by the same thread. The API is best suited to single-threaded usage - various settings are defined >via system properties, and therefore apply to all connections. There is a bug in the handling of HTTPS via a Proxy (the CONNECT is not handled >correctly). See Java bugs 6226610 and 6208335. It does not support virtual hosts. It supports only the following methods: GET, POST, HEAD, OPTIONS, PUT, DELETE and >TRACE It does not support client based certificate testing with Keystore Config.
Bug link: http://bugs.java.com/view_bug.do?bug_id=6226610
I've read the bug and saw that "Java SE Development Kit 8u131" would solve this problem - so I downloaded it and alas it didn't help at all.
I would appreciate any help.
Thank,
Yigal