Set Up the JMeter Test

This topic describes how to prepare your environment for running JMeter tests, and to define a JMeter test scenario.

We recommend that you check the best practices and limitations information before you begin set up.

Prerequisite setup for JMeter tests

Install the following on each load generator and machine that will run a JMeter test:

  • Apache JMeter. For supported versions of JMeter, see the System Requirements.

  • Java. This should be the appropriate version for the installed JMeter version.

Load generator setup:

  • Java setting for Windows: Check that the environment variable %PATH% includes the directory of jvm.dll (for example: %JAVA_HOME%/jdk/jre/bin/server).

  • Java setting for Linux: Check that the environment variable $LD_LIBRARY_PATH includes the directory of

  • We highly recommended that you define the following: 

    • Set the JAVA_HOME environment variable to point to the Java JDK folder.

    • Set the JMETER_HOME environment variable to point to the JMeter folder (containing JMeter sub-folders: bin, lib, etc.).

LoadRunner agent settings:

  • If the agent is set as Service, change the System environment variables JMETER_HOME, JAVA_HOME, and PATH , and restart the load generator machine.
  • If the agent is set as Process, change any User or System environment variables JMETER_HOME, JAVA_HOME, and PATH, and restart the agent.

Back to top

Add a JMeter test to a scenario

This task describes how to create a scenario containing a JMeter script, and define Runtime Settings and actions for the script.

To define a JMeter scenario:

  1. Make sure the load generator machines are set up to run JMeter tests, as described in Prerequisite setup for JMeter tests.
  2. On the main Controller toolbar, click the New Scenario button .
  3. In the New Scenario dialog box, in the Select the scripts... area, select the JMeter Scripts radio button.
  4. Click Browse and select the JMeter script (.jmx file).
  5. Click OK in the New Scenario dialog box. The scenario containing the JMeter script opens in the Design tab.
  6. Right-click the script and open the Runtime Settings dialog box, and configure the following:

    • Start measurements. Make sure this check box is selected (default setting).

    • JMeter path. Define the home path for the JMeter installation on the load generator. If the field is left empty, it will take the default path from the JMETER_HOME environment variable. (For more information on setting the default environment variable, see Prerequisite setup for JMeter tests.)

    • JMeter port. Leave it set to default to use the internal port range (4000 – 65535), or define a range.

    • Remote testing. Select the check box to run the test on multiple remote JMeter machines. For details, see Using JMeter remote/distributed testing.

    • JMeter additional properties file. This field is required if you are select Remote testing. Define the path to the additional properties file, listing the remote machines. For details on creating this properties file, see JMeter additional properties file.
  7. Open the Edit Action dialog box (described in see Edit Action Dialog Box), and set the following:

    • For action Start Vusers, set to start Simultaneously.

    • For action Duration, it is recommended to set to Run until completion.

JMeter additional properties file

When using JMeter distributed testing across multiple, remote machines, you must define a properties file containing the names of the remote hosts.

To define the properties file:

  1. Create a file named

  2. Inside the file, add the name or IP address of each remote host, separated by commas, using the format remote_hosts=<server name>.

    For example: remote_hosts=server1,server2,ip_address3

  3. Save the file at a location accessible to the load generator, and make sure the correct path to the file is defined in the JMeter runtime settings.

Back to top

See also: