Recording Traffic using Apache JMeter HTTP Proxy Server

In the last article, we discussed about hands on with Apache JMeter.  Now most of the testers might be thinking about what’s next after installation, understanding the tool and how about recording a test script using JMeter.

In today’s article we will see how to record your first JMeter Test script  using JMeter HTTP Proxy Server, How to do Firefox browser settings for recording JMeter first test plan, How to do JMeter load testing tool settings for recording your first test plan.

Recording using Apache JMeter HTTP(s) Proxy Server


The HTTP(S) Proxy Server allows JMeter to intercept and record your actions while you browse your web application with your normal browser. JMeter will create test sample objects and store them directly into your test plan.

First we have to setup proxy server in Firefox browser to checkout the First Test plan recording steps. Follow simple steps:

  • Open Firefox Browser
  • Click on Tools > Options > Advanced tab > Network Tab > Setting button.
  • Choose “Manual proxy configuration” radio button.
  • Enter HTTP Proxy: localhost
  • Enter Port: 8080 (Make sure that JMeter proxy server port number and local proxy server port number are same )

You can check following image to get exact steps for how to setup proxy server.

JMeter Firefox Proxy Server

Once the above setting is done open JMeter tool to set up recording for your first Test Plan.

1) To learn how to start JMeter you can check this post. Now open the JMeter by clicking on JMeter.bat file.

2) Right click on Test Plan and choose Add > Threads (Users) > Thread Group.

  • The new Thread Group element will be added under Test Plan. Read about Thread Group here.

JMeter Test Plan Thread Group

3) Right click on Thread Group and choose Logic Controller > Simple Controller. The new Simple Controller option will get added under Thread Group element.

JMeter Logical Controller Simple Controller

 4) Right click on Workbench and choose Add > Non-Test Elements > HTTP Proxy Server.

The new HTTP Proxy Server option will get added under Workbench element. This option will add JMeter proxy server in your JMeter test plan.

JMeter Https Proxy Server

5) Before start recording we have to do simple configuration setting in the HTTP Proxy Server option

  • Click on HTTP Proxy Server option
  • Under Global Setting section – Set Port: 8080 (Same port value which is configured in the above steps while configuring setting FireFox browser)
  • Under Test Plan Content section – Choose Target Controller: Thread Group > Simple Controller.

Once you complete your settings then JMeter HTTP Proxy Server will look like as below:

How to add JMeter Https Proxy Server

Now you are ready to start Recording using HTTP Proxy Server in JMeter & record your first JMeter test plan script in Apache JMeter. Click on “Start” button & open the URL in FireFox browser for which you want to run your performance testing script. Perform required navigation in FireFox browser & all steps will be recorded in Apache JMeter. (Note: Don’t do unnecessary navigation while recording, if you did that then please remove recorded script & start again from scratch.)

The recorded script will be displayed under Thread group > Simple Controller option same as displayed in below image. You should also explore the recorded script for your understanding how JMeter recording works using proxy server.

Recorded JMeter Test Plan using Http Proxy Server

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

5 thoughts on “Recording Traffic using Apache JMeter HTTP Proxy Server

  1. Do you have a spаm problem on this websitе; I also am a blogger, and I was wondering your situation; many of us have
    developed some nice methods and we are looκing to swap methods with other folks, why not
    shoot me an email if interested.

  2. Undeniably believe that which you stated. Your favorite reason appeared to be on the net the easiest thing to be
    aware of. I say to you, I certainly get irked while people consider worries that they plainly do not know
    about. You managed to hit the nail upon the top and defined out the whole thing without having side-effects
    , people can take a signal. Will probably be back to get more.

    Thanks

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