LoadRunner is a performance and load testing product by Hewlett-Packard (since it acquired Mercury Interactive in November 2006) for examining system behaviour and performance, while generating actual load. LoadRunner can emulate hundreds or thousands of concurrent users to put the application through the rigors of real-life user loads, while collecting information from key infrastructure components (Web servers, database servers etc). The results can then be analysed in detail, to explore the reasons for particular behaviour.

Consider the client-side application for an automated teller machine (ATM). Although each client is connected to a server, in total there may be hundreds of ATMs open to the public. There may be some peak times — such as 10 a.m. Monday, the start of the work week — during which the load is much higher than normal. In order to test such situations, it is not practical to have a testbed of hundreds of ATMs. So, given an ATM simulator and a computer system with LoadRunner, one can simulate a large number of users accessing the server simultaneously. Once activities have been defined, they are repeatable. After debugging a problem in the application, managers can check whether the problem persists by reproducing the same situation, with the same type of user interaction.

Working in LoadRunner involves using three different tools which are part of LoadRunner. They are Virtual User Generator (VuGen), Controller and Analysis.

A performance test is a technical investigation done to determine or validate the speed, scalability, and/or stability characteristics of the product under test. Performance testing is the superset containing all other subcategories of performance testing.

Elements of LoadRunner are:
- Virtual User Generator
- Controller

Virtual User Generator

The Virtual User Generator (VuGen) allows a user to record and/or script the test to be performed against the application under test, and enables the performance tester to play back and make modifications to the script as needed. Such modifications may include Parameterization (selecting data for keyword-driven testing), Correlation and Error handling.

LoadRunner supports several protocols like Web HTML/HTTP, Remote Terminal Emulator, Oracle and Web Services. A protocol can be understood as a communication medium between the clients and the server. For example a AS400 or Mainframe based application use Terminal Emulator to talk to the Server where as a Web Online banking application uses HTML with some Java and Web services. LoadRunner is capable of recording scripts in both single and multi-protocol modes.

During recording, VuGen records a tester's actions by routing data through a proxy. The type of proxy depends upon the protocol being used, and affects the form of the resulting script. For some protocols, various recording modes can be selected to further refine the form of the resulting script. For instance, there are two types of recording modes used in LoadRunner Web/HTTP testing: URL based, and HTML based.

Correlation : It is a method used by LoadRunner to handle Dynamic Contents. The examples of Dynamic content are ticket number in an online reservation system or a transaction id in an online banking application. These are named so, as these page components are dynamically created during every execution of the business process and always differ from the value generated in previous runs. These dynamic contents are a part of the server response. The LoadRunner usually identifies these on the basis of the left and right boundaries and ordinal identifiers.

Controller


Once a script is prepared in VuGen, it is run via the Controller. LoadRunner provides for the usage of various machines to act as Load Generators. For example, to run a test of 1000 users, we can use three or more machines with a LoadRunner agent installed on them. These machines are known as Load Generators because the actual load will be generated from them (Load Generators were previously known as "Injectors" - the latter term is still widely used). Each run is configured with a scenario, which describes which scripts will run, when they will run, how many virtual users will run, and which Load Generators will be used for each script. The tester connects each script in the scenario to the name of a machine which is going to act as a Load Generator, and sets the number of virtual users to be run from that Load Generator.

LoadRunner uses monitors during a load test to monitor the performance of individual components under load. Some monitors include Oracle monitors, WebSphere monitors, etc... Once a scenario is set and the run is completed, the result of the scenario can be viewed via the Analysis tool.

Load Runner Testing Process

Step 1: Planning the test. Here, we develop a clearly
defined test plan to ensure the test scenarios we develop
will accomplish load-testing objectives.

Step 2: Creating Vusers. Here, we create Vuser scripts that
contain tasks performed by each Vuser, tasks performed by
Vusers as a whole, and tasks measured as transactions.

Step 3: Creating the scenario. A scenario describes the
events that occur during a testing session. It includes a
list of machines, scripts, and Vusers that run during the
scenario. We create scenarios using LoadRunner Controller.
We can create manual scenarios as well as goal-oriented
scenarios. In manual scenarios, we define the number of
Vusers, the load generator machines, and percentage of
Vusers to be assigned to each script. For web tests, we may
create a goal-oriented scenario where we define the goal
that our test has to achieve. LoadRunner automatically
builds a scenario for us.

Step 4: Running the scenario.We emulate load on the server
by instructing multiple Vusers to perform tasks
simultaneously. Before the testing, we set the scenario
configuration and scheduling. We can run the entire
scenario, Vuser groups, or individual Vusers.

Step 5: Monitoring the scenario.We monitor scenario
execution using the LoadRunner online runtime, transaction,
system resource, Web resource, Web server resource, Web
application server resource, database server resource,
network delay, streaming media resource, firewall server
resource, ERP server resource, and Java performance monitors.

Step 6: Analyzing test results. During scenario execution,
LoadRunner records the performance of the application under
different loads. We use LoadRunner?s graphs and reports to
analyze the application?s performance.

Analysis of LoadRunner

This tool takes the completed scenario result and prepares the necessary graphs for the tester to view. Also, graphs can be merged to get a good picture of the performance. The tester can then make needed adjustments to the graph and prepare a LoadRunner report. The report, including all the necessary graphs, can be saved in several formats, including HTML and Microsoft Word format.

0 comments