LoadRunner Tutorial for Beginners

LoadRunner is a software testing tool from the Micro Focus family of products. Launched in 1993, it is the oldest load testing software on the market as well as one of the most popular. LoadRunner became part of the Hewlett Packard Enterprise (HPE) in the 2000s when HPE acquired Mercury Interactive. Let’s see how to start with LoadRunner with this LoadRunner tutorial.


What is LoadRunner?

LoadRunner is used to test apps and websites to understand how they behave when subjected to various levels of load – before going into production. This is an important step in the process of creating new apps, as poor performance once live, can cause significant financial losses.

To perform load tests, LoadRunner users must first design a load testing script using the VuGen component of the software and define how this test should be executed using the system’s controller. Depending on the chosen parameters of the app being tested, load generators within LoadRunner will then replicate the behavior of hundreds or even thousands of virtual users connecting to the app – behaving just as real users would for reliable testing.

About NeoLoad

NeoLoad provides a graphical interface which enables users to test up to 10 times faster than LoadRunner.
NeoLoad also provide automated test script maintenance to help you cut the time required to update your scripts when the code changes
And NeoLoad does not require deep expertise to provide accurate performance test results. Anyone in the team can become a performance tester

See how NeoLoad can help you design tests faster

Try NeoLoad, the most automated performance testing platform for enterprise organizations continuously testing from APIs to applications.


LoadRunner architecture

Before starting with the LoadRunner tutorial, we you have to understand the LoadRunner architecture.
LoadRunner from Micro Focus requires you to install several components before you can perform load testing. The VuGen component is essential for designing testing scripts, while you must use the controller component to define how the test will run and consult the analysis component to review all the reporting and analysis results following load testing.

loadrunner architecture


VuGen, also known as Virtual User Generator, is an Integrated Development Environment (IDE) used to define and simulate desired user behaviors for testing, and then generate the test scripts themselves. You can use VuGen to design test scripts that reproduce connections to an app as well as design a specific search, product comparison, purchase or payment type.

VuGen includes functionality to record communications between a client and server to generate test scripts in code called Vuser scripts.

Automate API and end-to-end application performance testing with NeoLoad, the continuous performance testing platform.


The controller

The controller is the central component of the LoadRunner testing tool. It manages the test flow while also registering an app’s performance against established key performance indicators (KPIs) for use by the analysis component.

Test execution management

Performance data collection

  • Number of virtual users (VUs) that need to be simulated for each test
  • Gather results periodically
  • Test duration with ramp-up and ramp-down times and number of simultaneous VUs
  • IP spoofing
  • Load generators used in testing
  • Error reporting
  • Transaction Declaration, etc.

Load generators

Load generators are the components of LoadRunner that simulate the hundreds or thousands of VUs as defined in VuGen for testing. Depending on the exact test and number of VUs required, you might need to use several load generators. LoadRunner’s controller lets you easily scale and manage load generators according to your needs.

Note that load generators are software components that consume a significant amount of hardware resources. However, the amount of hardware resources consumed – such as the processor and memory – will depend on the number of VUs and complexity of the scenarios set using VuGen.

As a rule, load generators are installed on different machines to the controller. Depending on your defined Vuser scripts and machine specifications, a number of load generators may be required for a complete simulation.

Start testing with NeoLoad, the fastest, the most realistic, and the most automated continuous performance testing platform.


The analysis component

Once your load scenarios have been executed, the analysis component comes into play.

During load testing, the controller creates a repository of results as they come through. This includes a host of raw data, such as the version of LoadRunner used and the configuration parameters that were set.

Crucially, it also records all errors that occurred during the test and puts all the error data into a database named output.mdb. The analysis component then analyzes the content of this file, displaying results in a visual, graphical format for easier identification and interpretation of trends. This helps you understand where errors and failures originated during load testing, so you can determine whether optimization of your app is necessary.

Test your app with LoadRunner, follow the three steps of the LoadRunner tutorial

Now, let’s start the LoadRunner tutorial.
The process of load testing with LoadRunner can be divided into three main steps:

  1. Design test scripts using VuGen
  2. Define the execution of tests
  3. Analyze results

1 – Design test scripts using VuGen

To design a script, VuGen captures HTTP traffic from actions performed within an app and reproduces those actions to simulate the behavior of a real user on an app.

A VuGen script typically looks like this:

An essential step in getting to grips with VuGen is understanding that reproduced scripts simulate network traffic that is a consequence of user action within the app, as opposed to simulating the actions of the users themselves. And unlike functional testing tools like UFT/QTP, VuGen only works at the protocol level with HTTP requests rather than at the graphical interface level.

loadrunner tutorial

Test API and application with NeoLoad, the most automated continuous performance testing platform.


2 – Define the execution of tests

The whole purpose of load testing is to simulate different levels of activity within an app to detect where failures occur – and crucially pinpoint the load level that generated the first failure. This requires a system that can perform scenarios with several concurrent users executing tasks simultaneously.

Load levels can be increased and decreased to mimic real operating conditions so as to cause stress on the server and uncover abnormal behavior within an app.

The results are then analyzed to identify causes of failures.

3 – Analyze results

During load testing, LoadRunner runs each scenario and records the app’s performance with varying levels of load. The analysis component then generates statistics and performs an analysis of collected data.

Analysis information is stored in a .lra file, and LoadRunner testing results are also compiled into a “Log” folder with all Vuser logs and records in the event you wish to investigate further.

The analyses are carried out according to different KPIs, focusing on the following core metrics: 

  • Number of simultaneous Vusers
  • Number of accesses per second
  • Speed
  • Average response time
  • Time period of the first buffer
  • Error stats


It’s also possible to view the raw data the LoadRunner analysis component generates with other reporting tools to discover even more about your app and its potential.

Organizations looking to modernize their software development and testing approaches are evaluating options beyond what they have with LoadRunner and Performance Center today which gave them success in legacy practices. See why on the NeoLoad vs LoadRunner page.