Load Runner

How to run JMeter test in Load Runner / Performance Center 12.55

Performance testing is critical to the success of your apps. If you don’t test until the end of the cycle, you risk production issues, user complaints, poor reviews, and damage to your brand. In Agile/DevOps environments, performance testing must be integrated with the whole development process because of the nature of these release cycles—testing literally can’t wait. 

Latest version of LoadRunner and Performance Center features several enhancements that improve and simplify application testing and facilitate collaboration among Agile/DevOps teams.

some says convert your LoadRunner scripts to JMeter or Selenium… but why? Why waste your time and resources on conversion tools that don’t really do the work? Why do the re-scripting? What’s the point?

Apache JMeter is a popular open-source tool for load testing, with a focus on web applications. In LoadRunner and Performance Center 12.55, you can run a JMeter test side-by-side with a LoadRunner test, and see results during test execution and offline using Micro Focus Analysis.

Running a JMeter test within LoadRunner or Performance Center test is currently free and unlimited; all you need to do is install JMeter on the load generator machine. The big bonus here is that in one powerful tool you can run and see measurements for LoadRunner/Performance Center and JMeter at the same time and later analyze them together. Now you can leverage the power of Micro Focus performance testing tools features.

Starting with Micro Focus LoadRunner (LR) 12.55 and Performance Center (PC) 12.55, you can execute JMeter tests in addition to other LoadRunner scripts. A scenario containing a JMeter test is supported for both local and remote execution, regardless of operating system.

Results from the LoadRunner scripts and JMeter test are collected and displayed, in a single location during the scenario execution, and are then available for investigation in Analysis.

The best part is that all of this is currently free and unlimited!

This blog post will show how to run JMeter scripts from LoadRunner Controller

Prerequisites:

  • Apache JMeter installed on each load generator machine running JMeter tests.
  • Java installed (as recommended by Apache JMeter):
  1. Windows – PATH should include the jvm.dll directory
  2. Linux – LD_LIBRARY_PATH should include the libjvm.so directory
  • Environment variable (recommended):
  1. JMETER_HOME – pointing to the Apache JMeter base folder
  2. JAVA_HOME – pointing to the installed Java

 Setting for LoadRunner scenario with a JMeter test:

  1. Open LR Controller
  2. Select the JMeter Scripts radio button

3.Press the Browse… button

4.Select JMeter Test file (e.g. Test_1.jmx) and click Open

5.Click OK button on the next window

6.Now you have JMeter tests in addition to LoadRunner scenarios.

Note:

  • The JMeter test will run as configured in the jmx file. The thread groups and internal scheduling will be handled by JMeter.
  • For JMeter groups, each virtual user will run a JMeter instance. If your jmx file is configured to execute 1000    threads and the group is configured to run 2 virtual users, 2 JMeter processes will run and 2000 threads will     be executed.
  • The JMeter test will be copied to temporary location on the Load Generator and will not affect the origin.

Runtime Settings for a JMeter test:

Runtime Settings provide general settings for executing the JMeter instance, regardless of the test content.

Select the JMeter test in the Scenario Groups and press (or Alt + t) to open the Runtime Settings.

  • Start measurements check box (checked by default)
  • JMeter path (JMeter home directory on local or remote load generator).
  • If it is not set, LR uses the JMETER_HOME environment variable.
  • JMeter port defines the JMeter port management range:

These ports are used for local communication between the load generator agent and the JMeter process.

  • Default: 4000 to 65535
  • Range: by user define

 Measurements for JMeter test:

We have developed a Backend Listener to receive online measurements from JMeter tests. These measurements are configurable in Runtime settings. When enabled, the graphs are available under a new section: Available Graphs -> JMeter Graphs. Under this section, the following graphs are available:

  • JMeter Active threads
  • JMeter Hits
  • JMeter Throughput
  • JMeter Transactions

Note: The best practice is to use online measurements when creating and testing the load test. To improve performance, Apache JMeter recommends turning online measurements off for real load tests (while no data will be collected from JMeter by Controller)

Analyze your results in Analysis:

All of the data from the test run, for both – LoadRunner scripts and JMeter tests are available in Analysis. Here you can analyze the tests results, compare graphs data and cross correlate results between scripts/rests.  

Best practices:

  1. Execute JMeter tests on a remote load generator.
  2. Use the latest version of Apache JMeter (version 2.13 and up are supported)

Reference

https://community.microfocus.com/t5/Application-Delivery-Management/How-to-run-JMeter-test-in-LoadRunner-Performance-Center-12-55/ba-p/1619836#.WhPL_VWWaJA

Categories: Load Runner

Tagged as:

7 replies »

  1. Facing an issue with heap allocated to Jmeter when we run the test from Performance center. Even though I have given heap -Xms12G -Xmx12G in jmeter.bat file but when I run the jmeter test from PC, its only allocating heap as 536MB. How to make it correct?

  2. check the path given in JMETER_HOME again “ C:\Users\xxxxxx\Desktop\apache-jmeter-3.3\apache-jmeter-3.3\bin\bin” it include double bin. So remove that Also keep the environment variable in capital letter

  3. When i am trying to run the Jmeter script in controller . I am facing the below error

    Error: The Java virtual machine (JVM) threw the following exception: java.io.FileNotFoundException: Invalid path C:\Users\xxxxxx\Desktop\apache-jmeter-3.3\apache-jmeter-3.3\bin\bin

    I added the Jmeter_Home variable in system variables, Can you please help me on this issue

  4. Hi , I am getting an error like
    The Java virtual machine (JVM) threw the following exception: java.lang.RuntimeException: Fail to inject backend listener.
    When I am trying to run J meter scripts using HP PC or controller. Could you please help me on this

    • Review and cross checked prerequisite given in the post like JMETER_HOME – pointing to the Apache JMeter base folder
      JAVA_HOME – pointing to the installed Java.. do setup on load generator as well if you are using . Try to use stable version of jmeter lesser than current version like 4 or 5.
      Backend Listener used to receive online measurements from JMeter tests .Apache JMeter recommends turning online measurements off for real load tests .

  5. 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.

  6. Where should I place the bulk test data files of the jmx file when upload the .jmx file to PC

Leave a Reply