Loadrunner Interview Questions & Answers

As of LoadRunner 9.5 following protocols are supported. This will increase with future releases. The interviewer is not looking for you to name all but a few (say 5-7 protocols).

Application Deployment Solution: For the Citrix protocol.
Client/Server: For DB2 CLI, DNS, MS SQL, ODBC, Oracle (2-tier), Sybase
Ctlib, Sybase Dblib, and Windows Sockets protocols.
Custom: For C templates, Visual Basic templates, Java templates,
Javascript and VBScript type scripts.
Distributed Components: For COM/DCOM, Corba-Java, and Rmi -Java protocols.
E-business: For FTP, LDAP, Palm, Web (HTTP/HTML), Web Services, and the dual Web/Winsocket protocols.
Enterprise Java Beans: For EJB Testing and Rmi-Java protocols.
ERP/CRM: For Baan, Oracle NCA, Peoplesoft-Tuxedo, Peoplesoft 8,
SAPGUI, SAP-Web, and Siebel (Siebel-DB2CLI, Siebel-MSSQL, Siebel-Web, and Siebel-Oracle) protocols.
Legacy: For Terminal Emulation (RTE).
Mailing Services: Internet Messaging (IMAP), MS Exchange (MAPI), POP3, and SMTP.
Middleware: Jacada and Tuxedo (6, 7) protocols.
Streaming: For MediaPlayer and RealPlayer protocols.

Vuser generator – For generating Scripts

Controller – For creating and executing scenarios

Analyzer – To analyze results.

Learn more about LoadRunner and its architecture in this video lesson.

The Agent is interface between host machine and controller.

There are four steps for developing a vuser script.
1-Record the Vuser Script.
2-Playback / Enhance the recorded vuser script.
3- Define the various run-time settings & check

4- Incorporate the script in a LoadRunner scenario

Learn more about Vuser Script development in the Video tutorial here.

This is essentially a trick question.

The number of VUsers required depends on your system under test, network configurations, hardware settings, memory, operating system, software applications objective of a performance test. There can not be any generic value for Vuser.

When Vuser is run as a process, the same driver program is loaded into memory for each Vuser. This will take a large amount of memory and will limit the number of Vusers you can run on a single generator.

When Vuser is run as a thread, only one instance of driver program is shared by given number of Vusers. You can run a number of Vusers on a single generator using the multi-threading mode.

Vuser-init records the pre-operations also called the initialization operations before the actual application is run.

An extended log will store information such as data returned by an advanced trace, parameter substitution and much other information depending on the options you select in run-time settings.

To create a parameter you will replace the hard-coded value within the script and replace it with a parameter. This allows a single Vuser to be run many times, and to use different data on each run. It helps in stimulating more real-life server demand as it prevents a server from caching results.

Learn more about parameterization in this Video Tutorial

I will divide the script into Actions based on the functionality. For example, Once Action for Logining into Application, another Action for booking and so on.

Actions increase code reusability, reduce maintenance time and hence, decrease costs.

You can set the number of Vusers in the controller section while creating your scenarios. Many other advanced options like ramp-up, ramp-down of Vusers are also available in the Controller section.

Learn more about Controller & Scenario creation

Monitors are used to “monitor” performance bottlenecks. They are used in Controller section of Load Runner

LoadRunner provides two types of checkpoints

a) Image Checkpoints: This checkpoint will verify the presence of an image on a page during run-time

b) Text Checkpoint: This checkpoint will verify the presence of a text-string on a page during run-time

Both of the above checkpoints can be added in Vugen.

Learn more about Checkpoints

The possible issues amongst others could be –

1. Lack of Hardware

2. Memory Leakage

3. Network related issues.

4. Application/Software error

Fine Tuning of network, database, and app and the web server is recommended.

At the network, level tryes to optimize the latency and bandwidth.

At the database level, verify all indexes and sequences by running profilers. You may also optimize your database queries.

At the App server level, run profilers for finding the memory leaks in the application

At the web server level, you can use monitors and optimize the throughput and other related metrics of the server.

The Rendezvous point is Synchronization/Wait point. Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task.

The significance of this is to emulate some heavy load only to the particular portion of the scenario and test the behavior of the application.

Correlation is used to obtain data which is unique for each run of your test script (ex: session ids). While recording, these dynamic values are hard-coded in your script causing the script to fail during playback. Correlation is a technique where dynamic values are not hard-coded in your script but are extracted at run-time to avoid failure.

Learn more about Correlation in this video tutorial.

It’s correlation technique which uses function Web_reg_save_param() to identify dynamic values in your script. It is important that your playback your script to verify that correlation is done successfully.

Learn Manual Correlation.

The Performance Bottlenecks can be detected by using monitors.

These monitors might be application server monitors, web server monitors, database server monitors and network monitors.

They help in finding out the troubled area in our scenario which causes increased response time.

The measurements made are usually a performance response time, throughput, hits/sec, network delay graphs, etc

The function is – lr_end_sub_transaction

Learn More about Transactions in this video.

A transaction is used to measure the time between executions of certain statements

A transaction instance is used for performance analysis

NO. It’s not possible to do correlation when a script is running but you can make changes once a script has stopped.

Elapsed time designates how much time has passed since the launch of the current event and is measured differently for different screens as given below –

In Scenario Status Window – Elapsed time is measured from the moment you hit “Start Scenario” or ” Initialize/Run Vuser?” button.

In “Vuser” window elapsed time is measured from the moment Vuser enters “running” state.

Yes. Caching has a negative effect. Cache is a temporary memory which stores your browsing history. When you visit a page for the SECOND time, the time required to load the page will be less than that required to load the page for your first visit since much of the information required to load the page is grabbed from the cache instead of the server. This will effect the response times in your test. Hence, it is recommended to turn-off caching.

Overlay Graph: It will overlay the content of two graphs that share a common x-axis

Correlate Graph: It will Plot the Y-axis of two graphs against each other.

Learn more about Analyzer

lr_error_message – Sends an error message to the LoadRunner Controller’s Output window

lr_debug _message – Sends a debug message to the LoadRunner Controller’s Output window

The objective of the performance testing is to check whether an application loads/updates within stipulated time limit (say 2 seconds). It uses metrics like response time, Requests per second. It is carried out under production – like load conditions.

The objective of load testing is to check scalability of the system. For example, finding out the maximum number of users supported by the system within certain specifications.

Before the step that retrieves the dynamic value

The HTML based recording generates this function.

Load testing is to test that if the application works well with the loads from large number of simultaneous users and transactions. It also used to determine whether it can handle peak usage periods.

Load Runner is a performance testing tool from HP. This tool supports all aspects such as Load, Stress, Endurance, data volume and spike Testing.

Following are the components of LoadRunner

  • The Virtual User Generator
  • Controller, and the Agent process
  • LoadRunner Analysis and Monitoring
  • LoadRunner Books Online

The Virtual User Generator (VuGen) component is used to record a script, and it enables you to develop Vuser scripts for a variety of application types and communication protocols.

Rendezvous points are introduced into Vuser scripts to simulate more users on the server. Rendezvous points instruct Vusers to wait during test execution in order to perform the tasks simultaneously.

For example, in a banking application, Rendezvous points are inserted for 100+ multiple users to deposit money simultaneously.

A scenario is nothing but an event that occurs for each testing session.

For example, a scenario defines

  • Number of users
  • Action to be performed
  • Virtual machines system

VuGen contains two options to debug Vuser scripts.

  • Run Step by Step command and
  • Breakpoints.

Functionality under load can be tested by running several Vusers concurrently. By increasing the Vusers, it is necessary to determine how much load the server can sustain.

The Throughput shows the amount of data in bytes that the Vusers received from the server in a second. When It is compared with transaction response time, throughput and response time get decreased.

The peak throughput and highest response time would occur approximately at the same time.

The Throughput shows the amount of data in bytes that the Vusers received from the server in a second. When It is compared with transaction response time, throughput and response time get decreased.

The peak throughput and highest response time would occur approximately at the same time.

Vuser_init action contains procedures to log in to a server and Vuser_end section contains logoff procedures.

The standard log sends a subset of functions and messages to the output log and subset of functions depends on the Vuser type.

Extended log sends a detailed script execution messages to the output log. It is mainly used during debugging when a user needs information about Parameter substitution.

Load Runner provides you with five different types of goals:

  • Number of concurrent Vusers
  • Number of hits per second
  • Number of transactions per second
  • Number of pages per minute
  • Transaction response time

Web_reg_save_param is the function that saves dynamic data information to a parameter.

Following are the testing process in LoadRunner:

  • Plan load test
  • Create Vuser Scripts
  • Define Scenario
  • Run Scenario
  • Analyze results

The remote command launcher enables the controller to start applications in the host machine.

Vuser scripts can be developed either by recording with the load vuser script generator or by using the Load runner vuser script template.

While running the scenario, LoadRunner controller instructs the remote agent dispatcher to launch LoadRunner agent. The controller instructs the LoadRunner agent to initialize, run, pause and stop the vusers.

Hits per second mean the number of hits the server receives in one second from the vuser.

Request per second is the number of request the vuser will request from the server.

Following are the advantages of Load Runner:

  • Reduces human intervention
  • Reduces the requirement of the systems
  • Helps in the better use of time and money
  • Effective utilization of automation
  • Single point execution

The vuser is the virtual users who can simulate the real users. The virtual users who take the place of real users’s operating client software, such as IE sending requests using the HTTP protocol to IIS or Apache web servers.

Use should create the external library that contains the function. This library must then be added to the bin directory of VuGen. And then, the user-defined function can be assigned as a parameter.

There are four run-time settings that can be made:

  • Pacing: This contains iteration count.
  • Log: Logging can be set to standard or disabled.
  • Think Time:  Capable of setting think time to be ignored or replaced.
  • General:  Allows the setting of Vusers for processes or multi-threading.

Monitors and the Data Resource Graph can be used to find database related issues. LoadRunner allow the tester to specify the resource that needs to be measured before the controller is run.

There are five types of graphs:

  • Network delay time graph – displays the time that elapses between request and response
  • Two transaction response time graphs – one translation response time graph for load and another one for percentile
  • Hits/second graph – Shows application traffic volume
  • Pages download/second graph – shows the rate at which pages are downloaded per second

Monitors can be used to detect a performance bottlenecks. These include network, web server, application server, and database server monitors.

These monitors can be used to locate trouble spots in scenarios that cause an increase in response time and throughput, network delays, performance response time, hits/second, etc.

Ramp up is gradually increasing the load on a server and can be simulated by gradually increasing the number of Vusers.  This feature can be found in the Scenario Scheduling Options.

Correlation can be performed in two ways:

  • Use the scan function to search for correlations and select a value from the result.
  • Record a pair of scripts and then compare them to each other.

The automatic correlation is set in recording options area on the correlation tab. Correlation can be enabled for the full script and rules for correlation can be defined.

Automatic correlation can be performed on a database by viewing the output window, scanning for correlation, and selecting the value that will be used.

The advantage of running a Vuser script as a thread which allows more Vusers to be used for one load generator. Running Vuser scripts as processes utilizes a lot of memory because all of the loaded scripts use the same driver.

This limits the number of Vuser scripts that can be run on one generator.

Overlay Graph:

Overlay graph has one X-axis and 2 Y-axis. Left Y-axis on the merged graph shows the current graph’s value & Right Y-axis show the value of Y-axis of the graph that was merged.

Correlate Graph:

There are two graphs, and the active graph’s Y-axis becomes X-axis of merged graph. Y-axis of the graph that was merged becomes merged graph’s Y-axis.

Following are the three sections of Vuser script, and they are as follows:

  • Vuser_init – Used for recording the logon.
  • Actions – Used for recording the business process.
  • Vuser_end – Used for recording the logoff.

Following are the four selection methods:

  • Sequential
  • Random
  • Unique
  • Parameter name

Parameter substitution can be viewed in the extended log in the Run time settings.

Following tools are required to analyze Vuser run results:

  • Execution Log
  • Run-Time Viewer and
  • Mercury Test Results window

Following are the differences between Manual and Goal Oriented scenario:

Manual Scenario
Goal Scenario
Main purpose is to learn how many Vusers can run concurrently Goal may be throughput, response time, or number of concurrent Vusers
Gives you manual control over how many Vusers run and at what time Load Runner manages Vusers automatically

Server resources monitor is used to find how much data is coming from Cache and helps to find out what are all the parts of the system have bottlenecks.

‘Show Browser’ setting is used to see the pages that appear during playback. This is useful for debugging Vuser during the initial stages of Web Vuser creation.

Continue on should be set only when making Execution Logs more descriptive or adding logic to the Vuser.

The purpose of a Load Runner transaction is to measure one or more steps/user actions of a business process.

Parameters are like script variables, and they are used to vary input to the server to emulate real users.

  • Different sets of data are sent to the server whenever the script is run.
  • Better simulate the usage model for more accurate testing from the Controller, and one script can emulate many different users on the system.

The lr_output_message is a function that sends notifications to the Controller Output window and to the Vuser log file.

The problem could be in the system itself or in the application server or in the code written for the application.

LoadRunner script code is obtained by recording in the ANSI C language syntax and it can be viewed in the script view.

Performance testing can be done by calculating the timing for both read and update transactions and check whether system functions are being performed in an acceptable time frame. In a multi-user environment, it is necessary to determine the effect of multiple transactions on the timing of a single transaction.

The configuration of systems refers to that of the client machines in which we will run Vusers. The configuration of client machine includes its hardware settings, memory, operating system, software applications, development tools, etc.

This system component configuration should match with the overall system configuration so as to achieve the load testing objectives.

The lr_abort function is used to abort the execution of a Vuser script. It instructs the Vuser to stop executing the Actions section, execute the vuser_end section and end the execution.

Think time is the time where a real user waits between actions.

When a user receives data from a server or other applications, the user may wait several seconds to review the data before responding. This time delay is called as think time.

Following are the protocols that Load Runner can support are:

  • .NET Record / Display
  • Database
  • DCOM
  • Network
  • Oracle E-Business
  • SAP
  • SOA
  • Web and Multimedia
  • Wireless
  • GUI
  • Java Record and replay
  • Remote desktop
  • Web 2.0

As of 20-Feb-2013 Load Runner 11.5 is the latest version and VUser script is used like a C Language.

Following languages are supported by LoadRunner:

  1. C Language
  2. Visual Basic Scripting
  3. Visual Basic For Applications
  4.  Java Scripting