How-to run JMeter test in LoadRunner / Performance Center 12.55?

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):
    • Windows – PATH should include the jvm.dll directory
    • Linux – LD_LIBRARY_PATH should include the libjvm.so directory
  • Environment variable (recommended):
    • JMETER_HOME – pointing to the Apache JMeter base folder
    • 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 buttonJMeterbutton.png
  3. Press the Browse… button
  4. Select JMeter Test file (e.g. Test_1.jmx) and click OpenSelectfile.png

  5. Click OK button on the next windowOK.png

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

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.RTS.png

  • 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 TransactionsGraphs.png

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.  

Analyse.png

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)
Troubleshooting:
If you experience trouble executing your JMeter test, check the following items.
Case
Option 1
Option 2
Error: “Cannot find the JMX file 'C:\jmeter_tests\test.jmx‘”
The file is not present in this location
Not enough disk space on load generator to clone the file.
No Graphs exists in Controller neither Analysis
The “Start measurement” check box is not enabled
 
Error: “The JMETER_HOME environment variable is not configured.”
Need to define the JMETER_HOME environment variable
Need to define the JMeter path in the Runtime Setting
Error Pattern: Message contains “Problem loading XML from: ‘……’ missing class ….”
Sometimes JMeter test contains 3rd party plugins.
And those plugins are missing in the current used JMeter installation.
  • Remove the unnecessary 3rd party plugins from the JMeter test
  • Add those 3rdparties’ dependencies to the current used JMeter
“Unable to bind to free port (for Shutdown/ StopTestNow) in range 4445 - 4455. Please extend the port range in the JMeter Runtime Settings. “
In Runtime Setting change or extend the range
In Runtime Setting change the port range radio-button to default

No comments:

Post a Comment