LoadRunner Interview Questions and Answers

LoadRunner Interview Questions and Answers

1) What is LoadRunner?
Loadrunner is a performance testing tool. It is developed by Mercury and acquired by HP. Latest version of Loadrunner is
2) What is the purpose of LoadRunner?
The purpose of LoadRunner is to accurately measure and analyze the performance and functionality of a system.

3) What are the components of LoadRunner?
Load Runner contains the following components:
•    Virtual User Generator: captures end-user business process and creates an automated performance testing scripts, known as Vuser script.
•    Controller: organizes drives, manages and monitor the load test.
•    Load generators: creates the load by running Vusers.
•    Analysis: helps to view, dissect and compare the performance results.
•    Launcher: provides a single point of access for all of the Load Runner components.

4) What Component of LoadRunner would you use to play back the script in multi user mode?
The Controller component is used to playback the script in multi-user mode. This is done during a scenario run where a vuser script is executed by a number of vusers in a group.

5) What is the LoadRunner testing process?
Following are the testing process in Load Runner:
•    Plan load test
•    Create Vuser Scripts
•    Define Scenario
•    Run Scenario
•    Analyse results
6) What Component of LoadRunner is used to record a script?
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.
7) What is load runner Agent?
Agent is interface between host machine and controller.

8) Can LoadRunner be used to test non-web based applications such as desktop applications?
LoadRunner can be used for desktop applications. When the VUE generator is started, it allows the tester to select the protocol that should be used. In addition to options for web-based applications, there are options for client/server applications as well.

9) What protocols are supported by LoadRunner?
LoadRunner supports standard protocols for the industry such as ODBC and HTTP as well as any other protocol that communicates over a windows socket.

10) Why is a Vuser script created?
The Vuser script is created to simulate the action that a virtual user will perform when executing a scenario.

11) What is the benefit of running a Vuser script as a thread?
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.

12) How many types of graphs are available in LoadRunner?
There are 5 types of graphs they are,

•    Network delay time graph – displays the time that elapses between request and response
•    Two transaction response time graphs – one transaction 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

13) What is the Rendezvous point?
Rendezvous point helps in emulating heavy user load (request) on the server. This instructs Vusers to act simultaneously. When the vuser reaches the Rendezvous point, it waits for all Vusers with Rendezvous point. Once designated numbers of Vusers reaches it, the Vusers are released. Function lr_rendezvous is used to create the Rendezvous point. This can be inserted by:
•    Rendezvous button on the floating Recording toolbar while recording.
•    After recording Rendezvous point is inserted through Insert> Rendezvous.

14) What are the different sections of the script? In what sequence does these section runs?
LoadRunner script has three sections vuser_init, Action and vuser_end.
•    vuser_init has requests/actions to login to the application/server.
•    Action has actual code to test the functionality of the application. This can be played many times in iterations.
•    Vuser_end has requests/actions to login out the application/server.
The sequence in which these sections get executed is vuser_init is at the very beginning and vuser_end at the very end. Action is executed in between the two.

15) How many VUsers are required for load testing?
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 performance test. There cannot be any generic value for Vuser.

16) How can you set the number of Vusers in Loadrunner?
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.

17) What are the types of check points is available in LoadRunner?
Loadrunner provides two types of check points they are,
•    Image Checkpoints: This checkpoint will verify the presence of an image on a page during run-time
•    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.

18) What is Elapsed Time in Load Runner?
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 form the moment Vuser enters "running" state.

19) What is the process for developing a Vuser Script?
There are 4 steps for developing a vuser script they are,
•    Record the Vuser Script.
•    Playback / Enhance the recorded vuser script.
•    Define the various run-time settings & check
•    Incorporate the script in a Loadrunner scenario

20) What is the difference in running the Vuser as a process and as a thread? Which is more advantageous way of running 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 more number of Vusers on a single generator using the multi-threading mode.

21) What are monitors?
Monitors are used to "monitor" performance bottlenecks. They are used in Controller section of Load Runner.

22) How to Configuring Load Runner Monitors?Configuring Load Runner Monitors
•    Go to run tab of controller window.
•    Select the corresponding monitor.
•    Drag and drop the monitor into any graphs.
•    Right click on graph and select add measurements.
•    Click on ADD and enter the machine name of the Web/App/DBserver
•    Click on ADD and select the required performance counter to be measured during the scenario.
•    Click on OK.

23) Define concurrent load?
Concurrent load is a load of Vusers that will be logged into the system or application simultaneously in order to put stress on the server.

24) How do we write a user defined function in LoadRunner?
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.

25) How can we find database related issues?
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.

26) What is correlation?
Correlation is used to obtain data which are unique for each run of the script and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries).

27) Explain the difference between automatic correlation and manual correlation?
Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.

28) Where do you set automatic correlation options?
Automatic correlation from web point of view can be set in recording options and correlation tab. Here we can enable correlation for the entire script and choose either issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.

29) What is standard deviation in loadrunner?
Standard deviation in loadrunner is done with the total response times of a particular transaction. For example, if you ran a transaction for 10 iterations. It will take the 10 transaction response times and calculates the Standard Deviation. If the standard deviation between these 10 values is high. Then it is a bottleneck, it should always low.
•    Response times for login page with 5 iterations ->1, 1, 1, 1, 1=Standard Deviation is 0
•    Response times for a logout page with 5 iterations 1, 2, 3, 4, 5, 6=Standard Deviation is 2.5 which is high.

30) What is IP Spoofer in loadrunner?
We can create the IP addresses dynamically using IP Spoofer.

31) What is parameterization & why is parameterization necessary in the script?
Replacing hard coded values within the script with a parameter is called Parameterization. This helps a single virtual user (vuser) to use different data on each run. This simulates real life usage of application as it avoids server from caching results.

32) Why do you create parameters?
Parameters are like script variables. They are used to vary input to the server and to emulate real users. Different sets of data are sent to the server each time the script is run. Better simulate the usage model for more accurate testing from the Controller; one script can emulate many different users on the system.

33) What are the different type of parameters available?
Custom, Date/Time, File, Group Name, Iteration Number, Load Generator Name, Random Number, Table, Unique Number, User Defined Function and Vuser ID.

34) What is the difference between correlation and parameterization?
Differences between correlation and parameterization are below:
•    In correlation, dynamically generated values or data are used throughout the script where as in parameterization, user defined or user provided values are used.
•    The values in correlation is given by the server automatically where as in parameterization, values is given by database manually.
•    In correlation, Tester doesn’t know these values but in parameterization tester know these values.
•    Sometime correlation is mandatory but parameterization is optional.

35) What is the difference between Overlay graph and Correlate graph?
Overlay Graph: It will overlay the content of two graphs that shares a common x-axis
Correlate Graph: It will Plot the Y-axis of two graphs against each other.

36) What are the number of graphs you can monitor using Controller at a time? What is the max of them?
One, two, four and eight graphs can be seen at a time. The maximum number of graphs can be monitored in at a time is 8.

37) What is ramp up and ramp down?
•    RAMP: creating and initializing Virtual Users (VUser) on the basis on design. It is not necessary to do Ramp. By default we can create 10 Vuser from a single computer.
•    Ramp Up: is a process when we first create the Vuser and then initialize it.
•    Ramp Down: Disposing the Vuser, created in Ramp UP. If we don’t perform the Ramp up then the chance of Junk memory increases.

38) Explain Error handling in LoadRunner?
We can specify how a Vuser handles errors during script execution. By default, when a Vuser detects an error, it exits. A run-time setting is used to instruct a Vuser to complete the execution of the test script when an error occurs while executing the script.
•    For doing this, select the Continue on Error check box in the miscellaneous run-time settings.
•    Instruct VuGen to complete all execution in where an lr_error_message function was invoked, as Failed.
•    The lr_error_message function is invoked by a programmed “If statement”, when a certain condition is met.

39) How do you identify the performance bottlenecks?
•    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 performance response time, throughput, hits/sec, network delay graphs, etc.

40) What is the difference between transaction and transaction instance in loadrunner?
•    A transaction is used to measure time between executions of certain statements.
•    A transaction instance is used for performance analysis.


Post a Comment