HP LoadRunner and its Architecture: An Introduction

Did you know companies lose up to $4.4 billion annually because of poor web performance? If your website doesn’t load within eight seconds, the users are going to switch to another one.
This is where performance testing comes into the picture. Currently, around 500 people might be using your software, but how will it behave with 50,000 users? By performance, we mean that the software should be scalable, load pages at faster speed, and stay stable despite rapid increase in visitors.
There are different types of tests to check the different variables including peak test, endurance test, stress test, and load test.
In this article, we are going to talk about HP LoadRunner, which is often considered as a pioneer in the field of performance testing.

What is HP LoadRunner?

An efficient performance testing tool, LoadRunner was first developed by Mercury in 1999. It was acquired by HPE in 2006, who then sold it to MicroFocus in 2016.

Know More : A Quick Guide To Load Testing: Why is it Crucial For Your Mobile App?

The tool is so popular that it owns 85 percent of the performance testing market share. It supports Rich Internet Applications (RIA), MS SQLServer, Web 2.0 (HTTP/HTML, Flex, Ajax, and Silverlight among others), Mobile, RTE, Mail, and other technologies, putting HP LoadRunner at a top position above all competitors.
Over the years, clients have considered HP LoadRunner as a benchmark for judging their product’s performance.
You can use it along with Application Lifecycle Management (ALM) and Unified Functional Test (QTP) as all three together act as an end-to-end solution for your product’s testing phase.
The tool simulates Virtual Users on your website or web application and replicates user requests and application responses to give you an in-depth look into how it will behave in a real situation.

Let’s take a look at six amazing features offered by its latest version, LoadRunner 12.60:

  • You can enable or disable HTTP/2 features using the runtime setting
  • The Network Virtualization feature is now free to use
  • You can connect one or multiple IP addresses for Oracle NCA protocol using the updated runtime setting
  • It offers new and updated Dockerized Load Generators
  • It offers better desktop pool support that you can use to sync on bitmap timeout per step for PCoIP protocol
  • You can now save a graph as an image file

HP LoadRunner Architecture

The LoadRunner architecture can get a bit complex, so let’s take one step at a time:
It has five key components, which include:

  • Load Generator
  • Controller
  • Vu Gen
  • Agent process
  • Analysis

Apart from this, it also offers modules to replay, capture, and script multiple application and networking technologies, which include:

  • Applications that use .NET and Java
  • Database servers including Oracle and Microsoft SQL Server
  • Remote client technologies like RDP and Citrix ICA
  • Internetworking protocols like LDAP, DNS, and FTP
  • E-mail protocols such as IMAP, POP3, MAPI, and SMTP

Let’s use an example to understand how the architecture works. Suppose you are checking the performance of your website, abcxyz.com for 5,000 visitors. They won’t be on the home page at once but different parts of the website. Each component plays specific roles in the performance testing process.

1. Load Generator

It simulates the VUsers (virtual users), which take up the hardware resources including processor and memory.
You will have to use multiple load generators so that the results are accurate, which depends on the number of VUsers.
The machines use 2 to 4 MB data to develop one simulated VUser, so you will need multiple machines that have a total of 1.25 GB of RAM space.

2. Controller

The controller is the most crucial component of the architecture as it manages the load simulation. Some other functions that it performs include:

  • IP spoofing
  • Error reporting
  • Nature of Load scenario
  • Handling VUsers behavior

Let’s say, 250 simulated users are in checkout, 3,000 are checking products on your website, and the remaining are making the payment. To keep the load real, the controller will release five customers every two seconds. They will be divided into two machines equally.

3. Vu Gen

Virtual User Generator replicates System under Load and records behavior and communication of the VUsers to and fro with the server in a scripted format. Examples of the business communication it records include:

  • Payment Processing
  • Product Surfing
  • Checkout
  • Checking User Profile

4. Agent process

It controls the way Controller and Load Generator communicates with each other.

5. Analysis

It records user logs from multiple load generators in the required formats. It also monitors data and helps you run result data.

How to plan performance testing?

You can divide HP LoadRunner Performance Testing process into five steps, which include:
1. Load Test planning – In the first step, you define the goals, select the system you want to use, and gather system usage data.
2. Creating VUGen Scripts – The actual process begins as you start recording VU Scripts, add test data, and enhance scripts.
3. Scenario Creation – You create scenarios that help you create a simulated reality. You will have to realign the goals to achieve accurate results.
4. Scenario Execution – In this step, you have to perform overload testing after executing the scenario.
5. Results Analysis – You have to check how the expected results with the actual results. Collect the feedback and make changes to your website.
The next process that follows performance testing is tweaking and optimization of your website or web application.

Know More : How To Use Apache JMeter To Perform Load Test On Mobile App

During this, you have to optimize the code, fine tune the system, and change configurations to make the website efficient enough to handle more visitors. After making the changes, you can run the HP LoadRunner test once more.

Methods For Testing Mobile App Performance Using LoadRunner

People using smart phones require the mobile apps to perform with the same effectiveness as the desktop software does. Due to inundation of numerous applications in the virtual store, the competition is extremely high. As a result, robust apps are in demand that pass rigorous testing parameters. If you are an app developer, use LoadRunner for mobile applications as it works extremely well with the native version. Although web apps are tested with the help of open source platforms, it is the LoadRunner that plays an important role to enhance the capability of the mobile based software.
app testing
Testing is a complex process where numerous devices right from Android to iOS are involved. There are different versions for native and web applications, however LoadRunner can resolve all the issues with the help of certain protocols.
HTTP/HTML:
It records the browser and native scripts that query the server with the help of http/html protocols. The whole process takes place at the transport layer of the TCP/IP model. Network traffic is recorded in a separate file called PCAP and then it is used to create a visual script. Even third party emulators can be used to generate the script logic.
True client essential for native mobile:
True client technology is used to record the scripts of the browser based or hybrid mobile applications. Apps are loaded onto the mobile devices and are tested end to end mode in order to find out errors. To make the process successful, one should install mobile test center app on the device. It consists of emulators that help to perform, extensive testing and build the most memorable apps in the market.
Mobile web protocol:
The protocol plays an important role in recording the user activity in the mobile applications based on the browser scripts. The whole process takes place in the TruClient browser that is modified to be an emulator.
SMP or SAP mobile platform:

  • The protocol helps the users to create .NET scripts according to their requirements an specification. Files are auto generated on SMP, however the script should not use threading as is the norm in .NET and Java environment because they might degrade the scalability of the testing process.
  • In addition, threads might hamper the measurement procedure at the client’s site. Users cannot invoke functions from the thread because their behavior remains undetermined.
  • In order to record the script using SMP, it is vital to generate the file such as Action.CS, Vuser_ init.cs, Vuser_end.cs.
  • The user should click on the new script and solution link and select SAP mobile platform.
  • Once the files are generated, they are copied into the script folder.
  • After the process is completed, you should invoke the save button, close the script file and reopen the content.
  • Thereafter, the location of the .DLL file needs to be added to the Shared DLL folders situated under the .NET settings located in the Run time settings menu.
  • You can replay the script to watch it in action with the SMP protocol.

Therefore, LoadRunner is useful for converting captured network traffic to HTTP user script, using either the provided tools or by using conventional capturing tools which can help you produce performance scripts for mobile app performance.