Micro Focus LoadRunner
This section walks you through integrating Perfecto Appium and Selenium scripts with Micro Focus LoadRunner. A sample LoadRunner project, including .jar
files for all dependencies and a sample script, is available here: https://github.com/PerfectoMobileSA/LoadRunnerSample
Prerequisites
The integration with LoadRunner requires:
- A 32-bit JDK version for the LoadRunner support of Java Vusers. For example, LoadRunner 12.60 work with JDK 1.8. See the latest release notes here: https://admhelp.microfocus.com/lr/en/12.60-12.63/help/WebHelp/Content/WelcomeContent/c_WhatsNew.htm
- An installation of LoadRunner. You can download from this link: https://www.microfocus.com/en-us/products/loadrunner-load-testing/download
- To explore LoadRunner with Java, the
.jar
files for all dependencies. LoadRunner does not support Maven or Gradle. Dependencies are available here: https://github.com/PerfectoMobileSA/LoadRunnerSample/tree/master/Dependencies - A sample script,
Actions.java
, available here: https://github.com/PerfectoMobileSA/LoadRunnerSample/blob/master/Perfecto_Appium_Example/Actions.java
The complete solution is available here: https://github.com/PerfectoMobileSA/LoadRunnerSample
Step-by-step instructions
Click a step to view details.

- Open the Virtual User Generator.
- Create a new script:
In the Create a New Script dialog, select Java Vuser. If you have provided the correct dependencies, this allows you to run any
.java
script.Click Create.
On the Actions.java tab that opens, you should see the class populated with some stubs. In our case, we want to put all our Selenium/Appium code inaction()
.
- Test the script, as follows:
- Click the run button to test the script. If the script passes, continue with step 5.
- If any compile errors occur, most likely your JDK is not set up correctly. In this case, do the following:
-
Open the sample script and copy its content.
-
On the Actions.java tab, paste the content of the sample script to replace the existing content.
A word on imported packages
import lrapi.lr; - Loadrunner method that allows you to add transaction timers. This is critical to having the logical steps added in the LoadRunner report. Example:
You can add transactions to LoadRunner by doing any of the following:
- Pairing
lr.start_transaction("Transaction_Name");
withlr.end_transaction("Trnasaction_Name", lr.AUTO);
-
(Recommended) Using method
uxTimer:
This grabs the UX timer from the Perfecto API and utilizes
lr.set_transaction(timerName, timeEx, lr.PASS);
to input a transaction in LoadRunner.
This adds a transaction entry in the LR report.
- Pairing
- Add the Selenium and Appium dependencies, as follows:
On the Runtime Settings tab, add the
.jar
files that contain all the dependencies.Save the script and run it again.
It should open the Perfecto UI to show the test run in the Test Analysis view.
When done, you should see the "Script Passed" message.

-
Open LoadRunner Controller and import the script you created.
- Modify the settings as needed and click the run button at the top left.
- When the run is complete, click Results > Analyze Results.
- In the LoadRunner Analysis Summary, view the transactions displayed.