Site Loader
Auckland, New Zealand
In our last couple of post in JMeter Test Plan creation, we created HTTP Requests manually by adding them one by one (which we need to test). But there is another cool option available in JMeter, where we can record the HTTP requests (automatically) on clicking the URL’s in the browser. This will come handy, since we don’t have to babysit and do creation of each and every request as we did earlier.

Configuring browser

In order to do recording the first and foremost thing we need to do is to configure the browser’s proxy setting, so that JMeter can listen the request and response coming from the browser. In order to do that in firefox, go to Tools à Options à Network Tab à Settings à and change the proxy settings to manual proxy configuration as shown below

Configuring JMeter

The next step is obviously JMeter, we need to do the following for recording to work
  1. Add HTTP Request Default and set server name or IP option as : seleniumhq.org
  2. Create Thread Group
    1. Add Recording Controller (Logic Controller)
  3. Add HTTP(s) Test Script Recorder in Workspace as shown below

  1. Configure HTTP(S) Test Script recorder to accept at least one URL Pattern. I am interested in all the patterns, hence we need to Add *./.* as shown below, which means JMeter will listen to any kind of request (it can be HTML, JSP, PHP etc)

    As you can see above, the port will be 8080 by default, but since we run via command prompt (to link JMeter with Fiddler), the port number will be 8888. Select the Target Controller as Recording controller and the URL Pattern to include.

Recording HTTP(S) request

In order to record, we first need to click the start button in HTTP(S) Test Script recorder as shown

Then navigate to firefox and open www.seleniumhq.org and click any pages you want and link you need and finally click stop button in recorder. Now, we will have the Recording controller with list of URL request as shown below (Automatically recorded)

We can just run the Test by clicking Ctrl + R or the start button and it will generate output as shown below

Using JMeter Templates

So far we saw how to configure and record requests in JMeter manually, we can still automate the process of configuring JMeter (discussed above) using Templates in JMeter, which you can access from File à Templates

And then we can select the recording template from the list of available templates as shown below

This will automatically create necessary configurations for recording in JMeter. I hope you really got clear understanding of recording in JMeter, this will reduce some of your time while working HTTP requests. Please leave your comments and thanks for reading !!! Thanks, Karthik KK

Post Author: Karthik kk

2 Replies to “Recording HTTP(S) Request in JMeter (Series)”

  1. Hi Karthick,

    I’m trying to record behind a proxy.

    Request is getting logged only if I configure browser to use localhost.
    However I’m not able to load web Pages even google (As the website is behind proxy).

    How do I make jmeter use proxy rather than tunneling under localhost ?

    I tried launching jmeter from command prompt using -H -P options.But it din have any effect.

    Can you please suggest me ?

Leave a Reply to Pradeep Cancel reply

Your email address will not be published. Required fields are marked *