Run JMeter
Scripts in LoadRunner
We can run JMeter scripts
in LoadRunner. One of good feature in both tools. Let’s see how we can do this.
There are some pre-requisites
to run JMeter scripts in LoadRunner:
Install the following on each load generator
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 libjvm.so.
·
We
need to define the following:
o
Set
the JAVA_HOME environment variable to point to the Java JDK folder.
o
Set
the JMETER_HOME environment variable to point to the JMeter folder
(containing JMeter sub-folders: bin, lib, etc.).
·
In
addition, for a Linux load generator, copy the following jar files from LoadRunner to JMeter:
o
cd
$JMETER_HOME/lib/ext/
o
cp
$M_LROOT/classes/HPEBackendListener.jar .
·
cp
$M_LROOT/bin/jeromq-0.3.4.jar .
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.
Now, we need LoadRunner
Controller and JMeter Script.
1. Launch LR Controller.
2. Select the JMeter Scripts radio
button.
3. Press the Browse… button.
4.
5. Select JMeter Test file (e.g.
Test_1.jmx)and click Open.
6.
7. Click OK button on the next window.
Note:
- Execute JMeter tests on a
remote load generator.
- Use the latest version of
Apache JMeter (version 2.13 and up are supported)
Measurements for JMeter test:
LoadRunner has 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
Happy Testing!!
Comments
Post a Comment