Using Default HTTP Requests

The main goals behind using the HTTP Default Request are to:

  1. Avoid data duplication.
  2. Make test scripts more maintainable.

After defining your users, you can move on to defining the tasks that they will be performing.

To begin with, you'll want to specify the default settings for your HTTP requests. Then, add the HTTP Request elements which use some of the default settings you specified here.

Begin by selecting the JMeter Users (Thread Group) element. Right-click to get the Add Menu option, and then select Add --> Config Element --> HTTP Request Defaults.

Then, select this new element to view its Control Panel.

Image: Managing default HTTP Request Defaults in JMeter Pro.

Like most JMeter elements, the HTTP Request Defaults Control Panel has a name field that you can change. In this example, we'll leave this field with the default value.

Skip to the next field, which is the Web Server's Server Name/IP. For the Test Plan that you are building, all HTTP requests will directed to the same Web server (jmeter.apache.org). Enter the domain name into the field. This is the only field where we will specify a value, so be sure to leave the remaining fields with their default values.

Image: Entering your server name or IP for your HTTP Request in JMeter Pro.

Click here to go to the next page.