Home Login Logout

Recording HTTPS Traffic with JMeter's Proxy Server

If you read our article, JMeter's Superpower: The 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. Here's how.

If you read our article, JMeter's Superpower: The 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. Here's how.

The problem?!

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 Chrome for this example.

Depending on your OS, the proxy settings may differ. I`m using GNOME descktop on linux OS and the proxy settins is as follow:

If you are using another browser be sure that you insert the IP/PORT address in the HTTPS Proxy field. 

Start your JMeter Proxy and recording script. By default there is a template project to run a proxy and recording script. Go to menu File>Templates.

Select Recording template to load and.

By loading Recording Template a script to record will be loaded as the current test script. Save the script before running the proxy server and run the proxy.

JMeter uses a dummy certificate to accept SSL connections from the browser. So you will be faced with security error in a browser.

Modern browsers detect the proxy and protect you from the data recording (Such as Chrom), so, it is impossible to recored from HTTPS.

A solution: Using Blazemeter extension

The main problem is the JMeter itself. JMeter acts as a Man In Meddle attach to records requests and responses and modern browsers detect the attache and protect users from the attack. 

HTTPS stands for Hypertext Transfer Protocol Secure. The problem with the regular HTTP protocol is that the information that flows from server to browser is not encrypted, which means it can be easily stolen. HTTPS protocols remedy this by using an SSL (secure sockets layer) certificate, which helps create a secure encrypted connection between the server and the browser, thereby protecting potentially sensitive information from being stolen as it's transferred between the server and the browser.

If you record data after the SSL layer, then you can save all requests and response. Blazemeter extension is one of the most famous recording tools which run in the Chrome and records data.

Once installed, click the BlazeMeter icon in your Chrome browser’s

Login to your BlazeMeter account if you haven’t already. You can verify the plugin is logged in via the “Hi [username]” greeting in the upper right-hand corner:

Login to your BlazeMeter account if you haven’t already. Then Give your test a name. Expand and set advanced options if desired (else leave them in their default settings). Click the Start recording button. The UI will change to show your yet-to-be-performed first step. Note that on the right-hand side there is a UI column and a JMX column, both of which start at (0).

Use the Pause recording button at any time you need to pause the recording. The button will change to Record so that clicking it a second time will unpause, resuming the recording.

Perform the actions in your application you wish to simulate in your test (for example: browse to a site, click on a selection, fill out a form, submit the form, etc.). Note that as you do so, the UI number will increase to reflect UI actions you performed on a user-level, and the JMX number will increase to reflect how many items are created within the performance script to do the same.*

To this point, every action you perform is being recorded to a “Test Step” (which you can rename by clicking the label). If you record everything to this step, it will be a monolithic script with a sequence of actions. On the JMX level, this will simply create a thread group consisting of these actions. The recorder, in fact, treats each step as a single transaction controller, so if you prefer, you may add additional steps to group subsequent actions under their own transaction controllers.

Simply, click on Edit drop-down menu and select JMX, then, from the new window select JMX to export (Note that you must log in to export JMX).

The example above will appear as follows in the resulting JMX:

Lates posts
Most visited posts

Built with love to give everyone an opportunity to say something to the world
Copyright © 2018 All rights reserved - SITE123 

Terms - Privacy - Abuse



سوالی دارید؟ با ما مطرح کنید !پشتیبانی آنلاین است.در حال حاضر پشتیبانی غیرفعال است.با تیم ویرا وب صحبت کنیدبا تیم ویرا وب صحبت کنید