LoadRunner Automation API

The LoadRunner Automation API allows execution of LoadRunner scenarios without using the LoadRunner Controller Graphic User Interface. Using the LoadRunner Automation API, you create programs that define and run scenarios. You might use the API, for example, to run tests at night or to run tests as part of another program.


The central object of the LoadRunner automation API is LrEngine object. When LrEngine is created, it will connect to an existing instance of the LoadRunner Controller or launch a new one.

Use LrEngine to access and program the scenario object that determines the properties of the test to be run, and to access Events related to groups, hosts, scenarios and rendezvous.

Exceptions: LoadRunner Automation handles most errors by generating an exception rather than a return code. In general, the return codes only indicate that the function ran successfully. A return code of zero does not indicate that the action was performed successfully.

You can catch the exceptions by writing your own exception handlers or using standard error classes. Errors in creating objects can be detected by checking if the object is Nothing.

Glossary of terms used in LoadRunner Automation Library:

Controller: The LoadRunner Controller provides a graphic user interface for controlling and managing load test scenarios.

Group: A logical collection of virtual users, usually running the same script.

Host: A machine that executes one or many virtual user scripts, enabling the virtual user to emulate the actions of a human user. When you execute a scenario, the Controller distributes each virtual user in the scenario to a host.

Rendezvous: Emulates heavy user load on the application. You insert rendezvous points into virtual user scripts to ensure that multiple virtual users act simultaneously. For example, to emulate peak load on a bank application, you can insert a rendezvous point instructing 100 virtual users to transfer funds within their accounts at the same time.

Rendezvous Group: A collection of rendezvous.

Scenario: A class that includes a number of scripts to be run, and specifies the hosts that will run the scripts and the virtual user groups associated with each one.

Script: Describes the acts that a virtual user performs during scenario execution. When you run a scenario, each virtual user executes a script. The virtual user scripts include functions that measure and record the performance of your application.

Vuser: A virtual user. When you run a scenario, Vusers emulate the actions of human users, operating your application. A scenario can contain tens or thousands of Vusers. To emulate conditions of heavy user load, you create a large number of Vusers that perform a series of tasks.

Also See: Other LoadRunner Tutorials

Rahnuma Tasnim

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top