Recording HTTPS Traffic with JMeter’s Proxy Server

If you read our article, Recording using Jmeter HTTP Proxy Server, then you already know how to use JMeter’s Proxy Server to record HTTP traffic.
But what if a website uses SSL encryption? 
Then, you better make some configuration changes. How? We’ll tell ya’.

Record HTTPS Traffic with the JMeter Proxy Server

By default, JMeter supports recording HTTPS (SSL) in versions 2.3.4+ and HTTP Samplers are configured to accept all certificates, whether trusted or not.
To record encrypted traffic, first configure the JMeter Proxy Server and browser proxy settings. We used Firefox for this example.
Configuring the JMeter proxy server and browser proxy settings in Firefox
If you are using another browser be sure that you insert the IP/PORT address in the HTTPS Proxy field.
Start your JMeter Proxy Server and open application in the browser.  JMeter uses a dummy certificate to accept SSL connections from the browser.
hps2
To record encrypted traffic, accept  JMeter’s dummy certificate.
  • Click “I Understand the Risks”
  • Click “Add Exception…”
  • Uncheck “Permanently store this exception”
  • Click “Confirm Security Exception”
Now,  you can see that the encrypted traffic was successfully recorded. You can also find errors in  the JMeter log:
ERROR – jmeter.protocol.http.proxy.Proxy: Problem with SSL certificate? Ensure browser is set to accept the JMeter proxy cert: Received fatal alert: bad_certificate javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate 

How to Remove JMeter ‘s Dummy Certificate

 To remove JMeter’s dummy certificate, open Preferences -> Advanced -> Certificates -> View Certificates. In a new window choose “Servers” tab. Select certificate and click “Remove”.
Remove JMeter’s dummy SSL certificate

Troubleshooting: Recording Encrypted Traffic

When recording encrypted traffic, there are 2 issues that can pop up.
1. No possibility to add an exception.
a.blazemeter.com uses an invalid security certificate. The certificate is not trusted because it is self-signed.
The certificate is only valid for the JMeter Proxy (Error code: sec_error_cert_signature_algorithm_disabled).
2. The browser prevents adding an exception
You will see a warning message: “This site provides valid, verified identification. There is no need to add an exception.”
Troubleshooting when JMeter’s SSL certificate is only valid for the JMeter Proxy
The solution for both issues are the same.  Clear your browser history. A quick Ctrl+Shift+Delete, and clearing the history of the last hour should do it, though, sometimes you may have to clear ALL your history if recording the site for a long time.
Troubleshooting when JMeter’s SSL certificate is only valid for the JMeter Proxy: Clear history

If you enjoy reading article then you can subscribe our updates for FREE, just add your email id . I will keep on updating the article for latest testing information. Subscribe and stay tuned for updates, there’s lot more to come.

🙂 Happy Performance Testing !! 🙂

 

Advertisements

One thought on “Recording HTTPS Traffic with JMeter’s Proxy Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s