Recording HTTP tests in jmeter

Now we are going to explain how to configure JMeter to record HTTP requests. In order to do that we need Firefox installed in our machine, I am using the version 32.
  • Get Firefox to use the JMeter proxy
Go to your Firefox network settings and select the manual proxy option and set as server localhost and port 8080 (actually this deepens on your JMeter configuration). After that, check the option “Use this proxy server for all protocols”.
firefox configuration
  • First of all we create a test plan as we did before.
We add a new Thread Group and we give a name to it. We configure the Thread Group to have 50 threads, 10 seconds as ramp-up period and number of loops equals 1.
recording thread group config
  • Add HTTP Request Defaults.
On the Thread Group that we just created, we add a new Config Element and we select “HTTP Request Defaults”.
recording http request defaults
You should write here the server name that you want to test.
  • Add Recording Controller
Now we add a recording controller to the workbench.
Select the workbench, not the test plan, and add a Non Test Element of the type “Test Script Recorder”.
recording workbench test recorder
You should now that the workbench has to be stored independtly from your test plan. Saving your test plan does not save the workbench.
Configure the Recorder as follows:
recording workbench test recorder configuration
  • Add timer
If you want you can add a timer (constant) to your recorder, this timer will be used by each HTTP request that is recorded.
  • Start recording
By clicking on the start button of the recorder, you will start the JMeter proxy server.
recording start record
  • Records should appear
If you go to a web page in order to make an example HTTP request, for example go to http://www.oviedin.com using Firefox (after configuring it as explained in the first step of this chapter) you will see that different entries appear under the Recording Controller in your test plan.
records controller
These records are actually HTTP requests that have been done while querying the web page mentioned before. Only records included in the filter configured in the Test Script Recorded will be stored. They can be reconfigured and used afterwards in your test plans.