Upload and run JMeter scripts

This topic provides an overview of how to upload and run JMeter scripts from LoadRunner Enterprise.

JMeter scripts overview

JMeter is an open source load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications. If you work with JMeter tests, LoadRunner Enterprise provides the ability to also run the tests.

By including JMeter (.jmx) scripts in your tests, you can run one or more JMeter tests side-by-side with any other LoadRunner Enterprise tests, giving you a single entry point for executing your performance tests.

Measurements can be viewed online and offline (via LoadRunner Enterprise and Analysis), using the data points from the JMeter tests.

Back to top

Set up and run a JMeter test

This task describes how to upload JMeter scripts to LoadRunner Enterprise and configure runtime settings.

  1. Prerequisites:

    • Download and install JMeter and the latest 64-bit JRE or JDK on all load generator machines on which the script will be run. For JMeter download details, see the Apache documentation. For supported versions of JMeter, see the System Requirements.

    • When installing JMeter, it is recommended to install it on the same path for all the load generators, since you need to enter this path when configuring runtime settings in the Performance Test Designer (see step 3).

    • Create scripts in JMeter and save the scripts locally. The scripts must be saved in ZIP format and must include all the files in the test scripts folder.

      Note:  

      • The file path inside a script folder must not exceed 260 characters.

      • To download .csv files, you need to manually copy the .csv files on the load generator running JMeter, and reference the path to their location in the script.

  2. Upload JMeter scripts to LoadRunner Enterprise

    1. From the LoadRunner Enterprise navigation toolbar, click and select Test Management (under Testing).

    2. Select a destination folder for the scripts, or create a new folder. For details on how to create a folder, see Design performance tests.

    3. Click the Upload Scripts button.

    4. Select scripts to upload, and configure the upload settings. For details, see Upload scripts.

    5. Click Upload to upload the selected scripts to the specified destination folder.

      After uploading the JMeter script to LoadRunner Enterprise, you can select the script in the test management tree (identified by the icon), and view script details in the Preview pane.

  3. Configure JMeter runtime settings

    1. After you have uploaded a JMeter script to LoadRunner Enterprise and added it to a test, select the test in the test management tree and click Edit Test.

    2. In the Groups & Workload view, select a Vuser group and click Edit Runtime Settings . The JMeter Runtime Settings dialog box opens.

    3. Configure the runtime settings:

      UI Elements Description
      JMX Measurements Select to enable JMX measurements during performance test execution.
      JMeter path Enter the path to the JMeter script used in step 1, or leave empty to use the default %JMETER_HOME% environment variable.
      JMeter port

      Select the JMeter port to use:

      • Default. Uses the default port (JMeter starts from port 4000 and uses an alternate port if the default port is being used).

      • Range. Enter a range for the JMeter port, or use the default JMeter range (4445 - 4455).

      Remote testing

      Select this option to run JMeter in server/node mode.

      Running JMeter remotely can replicate a test across many low-end computers and thus simulate a larger load on the server.

      JMeter additional properties file

      Enter the local path for the remote load generator that is used as the JMeter Controller for remote JMeter Nodes.

      Note:

      • This field is enabled only when the Remote testing option is selected.

      • Make sure the additional properties file actually exists in the local path on the remote load generator that is used as the JMeter Controller for remote JMeter Nodes when the test starts.

  4. Create a LoadRunner Enterprise test, and assign the JMeter script to it.

    For details, see Design performance tests.

  5. Run the test.

    For details, see Run performance tests.

    Note when running a JMeter script:

    • One Vuser will execute all of the JMeter threads defined for each jmx file.

    • We recommend setting test duration to Run Until Completion.

Back to top

See also: