JMeter Best Practices and Troubleshooting

This topic describes best practices and limitations when working with JMeter, and how to troubleshoot issues that may occur.
In this topic:

Graceful shutdown

Generally, JMeter supports shutting down gracefully. This requires appropriate port configuration, and to set the Run until completion option.
If there is a timeout by Controller, JMeter will receive the shutdown gracefully command and stay there for 5 minutes.
Click Stop Now in the Run tab if you want to stop the scenario aggressively.

Best practices

The following are recommended as best practices when working with JMeter tests:
  • We recommend that you use scenario mode (Vuser group mode) when running JMeter scripts. If you do use percentage mode, note how many instances of the JMeter test you will be executing.
  • Before running LoadRunner scenarios, check that your JMeter test can run with the JMeter installation on the load generator.
  • Run a maximum of one .jmx test (using 1 Vuser - default value) per each load generator. If the .jmx test is running a lot of threads, more than one test may overload the system.
  • Let the scripts run to completion.

Limitations

Note the following limitations when working with JMeter in LoadRunner:
  • Service level agreements (SLAs) are not supported for JMeter tests.
  • Network Virtualization is not supported for JMeter tests.
  • JMeter remote testing feature (one JMeter client instance controlling multiple remote node instances) is not supported with LoadRunner.

Troubleshooting JMeter tests

If you have any difficulty running JMeter tests, check if the following can resolve the issue.
Error: Cannot find the JMX file 'C:\jmeter_tests\test.jmx‘.
Possible causes:
  • The file is not present in this location.
  • Not enough disk space to clone the file.
Error: The JMETER_HOME environment variable is not configured.
Resolution: Define the JMETER_HOME environment variable, or add the JMeter path in Runtime Settings.
Error pattern: Message contains “Problem loading XML from: ‘……’ missing class ….
Resolution: The JMeter test may contain 3rd-party plugins, and the plugins are missing in the currently used JMeter instance. Either remove the plugins from the JMeter test file, or add the plugins to the JMeter instance.
Error: Unable to bind to free port (for Shutdown/StopTestNow) in range 4445 - 4455. Please extend the port range in the JMeter Runtime Settings.
Resolution: In Runtime Settings, extend the JMeter port range, or change to default.
There is no data in JMeter graphs in Controller or Analysis.
Resolution:
  • In Runtime Settings, make sure that the Start measurement check box is selected.
Errors: Failed to create a Java virtual machine (JVM); Failed to load the 'jvm.dll/libjvm.so’ library file.
Resolution: Check that Java is properly installed on the machine.
  • For Windows: Check that the folder that contains jvm.dll is included.
  • For Linux: Check that LD_LIBRARY_PATH includes directory of libjvm.so.

No comments:

Post a Comment