The MOST ASKED Loadrunner Interview Questions and Answers
Last updated on 19th Jun 2020, Blog, Interview Questions
LoadRunner is one of the best-licensed Performance Testing tools in the market. It is best suited for most of the upcoming technologies because of the wide range of supported protocols. Over thousands of vacancies are available for the Loadrunner developers, experts must be acquainted with all the components of Loadrunner technologies. This is necessary for the students in order to have in-depth knowledge of the subject so that they can have better employment opportunities in the future. Knowing every little detail about Loadrunner is the best approach to solve the problems linked with the problem. This ultimate list of best Loadrunner interview questions will ride you through the quick knowledge of the subject and topics like Performance Testing, Virtual User generator, Controller, Analysis. This Loadrunner interview questions and answers can be your next gateway to your next job as a Loadrunner expert.
1. What is LoadRunner?
LoadRunner works by creating virtual users who take the place of real users operating client software, such as sending requests using the HTTP protocol to IIS or Apache web servers. Requests from many virtual user clients are generated by Load Generators in order to create a load on various servers under test these load generator agents are started and stopped by Mercury’s Controller program. The Controller controls load test runs based on Scenarios invoking compiled Scripts and associated Run-time Settings. Scripts are crafted using Mercury’s “Virtual user script Generator” (named “V U Gen”), It generates C-language script code to be executed by virtual users by capturing network traffic between Internet application clients and servers. With Java clients, VuGen captures calls by hooking within the client JVM. During runs, the status of each machine is monitored by the Controller. At the end of each run, the Controller combines its monitoring logs with logs obtained from load generators, and makes them available to the “Analysis” program, which can then create run result reports and graphs for Microsoft Word, Crystal Reports, or an HTML webpage browser.
Each HTML report page generated by Analysis includes a link to results in a text file which Microsoft Excel can open to perform additional analysis. Errors during each run are stored in a database file which can be read by Microsoft Access.
2. When is Loadrunner Used?
Load runner is used to test applications when load sustaining is critical for our project and the tool/application developed is expected to work under heavy loads. In all cases, load testing manually is not possible.
3. What are the components of LoadRunner?
The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.
4. What Is The Advantage Of Using Loadrunner?
- loadrunner automatically records the performance of the client/server during the test.
- loadrunner checks where performance delays occur network/client delays.
- loadrunner monitors the network and server resources to help improve performance.
5. How can we find database related issues?
Monitors and the Data Resource Graph can be used to find database related issues. LoadRunner allows the tester to specify the resource that needs to be measured before the controller is run.
6. What Is a Loadrunner Controller?
Controller manages and maintains the scenario. Using a controller you control all the vuser in a single workstation .
7. What Is The Loadrunner Testing Process?
There are 5 steps:
- planning the test.
- creating the vuser script.
- creating the scenario.
- running the scenario.
- analyze the test result.
8. 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.
9. What Is a Loadrunner Agent?
Agent is the interface between host machine and controller.
10. What Is Loadrunner Api Function?
Database vuser do not operate client applications. Using the LoadRunner API function the database vuser can access the data from the server.
11. What is the Process that you follow starting from Pt Requirements?
Identify the Scenarios → Plan the Load Test → Design The load Test (Scripting the Vuser) → Create the Scenario (Controller) → Design Scenario → Execute Scenario → Monitor the Scenario → Generate the Report → Analyse the Report
12. What is a scenario?
A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.
13. Explain the recording mode for web Vuser script?
We use VuGen to develop a Vuser script by recording a user performing typical business processes on a client application. VuGen creates the script by recording the activity between the client and the server. For example, in web based applications, VuGen monitors the client end of the database and traces all the requests sent to, and received from, the database server. We use VuGen to: Monitor the communication between the application and the server; Generate the required function calls; and Insert the generated function calls into a Vuser script.
14. What Protocols Does Loadrunner Support?
Industry standard protocols for example HTTP and ODBC are explicitly supported by LoadRunner. Furthermore any protocol that communicates over a windows socket can be supported.
15. What can i monitor with loadrunner?
Monitor system bottlenecks during a test run and capture and display the performance data from every server or component.
16. What are the Vuser Components in Loadrunner?
- Application Components used are client, database or additionally business application server.
- Web Server works on and through LAN,WAN,or www connection.
- Application Server components are client, business server and database server without use of www.but through Protocols like FTP.
17. What is the advantage of running the Vuser as thread?
The advantages of running a VUser are following:
- Vusers support multi threaded environments.
- Using this multi threaded environment we can run more Vusers per load generator.
- If the Vuser is run as a thread, only one instance of the driver program is needed to be loaded into memory for the given number of Vusers.
- Sharing of memory takes place between each thread, helping in running more Vusers per generator.
18. What Functions would be Generated when selected Ajax Protocol ?
19. 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). 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.
20. How do you find out where correlation is required?
Two ways: First we can scan for correlations, and see the list of values which can be correlated. From this we can pick a value to be correlated. Secondly, we can record two scripts and compare them. We can look up the difference file to see for the values which needed to be correlated.
21. 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 to issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for databases can be done using the show output window and scan for correlation and picking the correlate query tab and choosing which query value we want to correlate. If we know the specific value to be correlated, we just create correlation for the value and specify how the value to be created.
22. What Is a Host?
Host is a machine which executes the vuser script.
23. What is the process for Developing a Vuser Script?
There are 5 steps for developing a vuser script:
- recording the vuser script .
- edit the vuser script.
- runtime setting .
- run the vuser script in stand-alone mode.
- incorporate the vuser script into a LoadRunner scenario.
24. How do you write user defined functions in LR?
Before we create the User Defined functions we need to create the external library (DLL) with the function. We add this library to the VuGen bin directory. Once the library is added then we assign the user defined function as a parameter. The function should have the following format: __declspec (dllexport) char* (char*, char*)
25. How do you identify which protocol to use for any application?
Previously Performance tester had to depend much on the development team to know about the protocol that application is using to interact with the server. Sometimes, it also used to be speculative.
However, LoadRunner provides a great help in the form of Protocol Advisor from version 9.5 onwards. Protocol advisor detects the protocols that application uses and suggests us the possible protocols in which script can be created to simulate the real user.
26. What is correlation? Explain the difference between automatic correlation and manual correlation?
Correlation is used to handle the dynamic values in a script. The dynamic value could change for each user action (value changes when action is replayed by the same user) or for different users (value changes when action is replayed with different user). In both the cases correlation takes care of these values and prevents them from failing during execution.
Manual Correlation involves identifying the dynamic value, finding the first occurrence of dynamic value, identifying the unique boundaries of capturing the dynamic value, writing correlation function web_reg_save_param before the request having the first occurrence of dynamic value in its response.
Automated correlation works on predefined correlation rules. The script is played back and scanned for autocorrelation on failing. Vugen identifies the place wherever the correlation rules work and correlates the value of approval.
27. How to identify what to correlate and what to parameterize?
Any value in the script that changes on each iteration or with different users while replaying needs correlation. Any user input while recording should be parameterized.
28. How many VUsers are required for load testing ?
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 can not be any generic value for Vuser.
29. What is the difference in running the Vuser as a process and as a thread? Which is the 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 the driver program is shared by a given number of Vusers. You can run more number of Vusers on a single generator using the multi-threading mode.
30. What is the significance of “Vuser-init “?
Vuser-init records the pre-operations also called the initialization operations before the actual application is run.
Enroll in Advanced LoadRunner Certification Course & Build Your SkillsWeekday / Weekend BatchesSee Batch Details
31. What is an extended log?
An extended log will store information such as data returned by server and advanced trace, parameter substitution and much other information depending on the options you select in run-time settings.
32. Why do you create parameters?
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 servers from caching results.
33. How does LoadRunner execute a Performance Scenario?
You can easily create and run the load test scenario. Following steps are involved in the process:
- Test planning: A thorough test plan is required for successful load testing.
- Prepare Vuser Script: Script contains tasks performed by each Vuser or multiple Vuser.
- Define the Scenario: A scenario describes an event that occurs during a testing session. It includes a list of machines where the Vuser”ll run, a list of scripts to launch by Vuser and the no. of Vusers.
- Run the Scenario: Emulate load on the server by introducing multiple Vusers to perform the task.
- Monitor performance: Using LR online run-time, transaction resources, database resources and firewall resources can be monitored.
- Analyze results: It produces graphs and reports. You can use them to analyze the performance of an application.
34. How do you identify Performance test use cases of any application?
Test cases/Uses cases for Performance test are almost same as any manual/functional testing test cases where each and every step performed by the user is written. The only difference is that all manual test cases can’t be Performance testing use cases as there are few criteria for the selection as:
- The user activity should be related to critical and most important functionality of the application.
- The user activity should be having a good amount of database activity such as search, delete or insert.
- The user activity should be having good user volume. The functionality having less user activity is generally omitted from Performance testing point of view. e.g admin account activity.
Any of the manual test cases that fulfill the above criteria can be used as performance testing use case/test case. If manual test cases are not written step by step , the Performance team should create dedicated documents for them.
35. What is Simultaneous user in load runner ?
Simultaneous user means doing the same task within the group like once user is performing login, profile search & logout then again doing the same activity in a different group.
36. How will you divide your script into multiple Actions? Why?
I will divide the script into Actions based on the functionality. For example, Once Action for Logging into Application, another Action for booking and so on.
Actions increase code reusability, reduce maintenance time and hence, decrease costs.
37. 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.
38. What are monitors?
Monitors are used to “monitor” performance bottlenecks. They are used in Controller section of Load Runner
39. What are the types of checkpoints available in LoadRunner?
LoadRunner provides two types of checkpoints:
- 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.
40. What kind of problem can we face regarding hardware, software, network and memory bottleneck during the performance test?
The possible issues amongst others could be:
- Lack of Hardware
- Memory Leakage
- Network related issues.
- Application/Software error
41. What would be your recommendation to improve performance measures?
Fine Tuning of network, database, and app and web server is recommended:
- At the network level try to optimize the latency and bandwidth.
- At 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.
42. What is the Rendezvous point?
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 a particular portion of the scenario and test the behavior of the application.
43. What is Correlation?
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.
44. What is Manual Correlation?
Its correlation technique which uses function Web_reg_save_param() to identify dynamic values in your script. It is important that you playback your script to verify that correlation is done successfully.
45. 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
46. What are different types of vuser logs which can be used while scripting and execution? What is the difference between these logs? When you disable logging?
There are two types of Vuser logs available –Standard log and Extended log. Logs are key for debugging the script. Once a script is up and running, logging is enabled for errors only. Standard log creates a log of functions and messages sent to the server during script execution whereas Extended log contains additional warnings and other messages. Logging is used during debugging and disabled while execution. Logging can be enabled for errors in that case.
47. What is the Modular approach of scripting?
In the Modular approach, a function is created for each request (e.g. login, logout, save, delete, etc.) and these functions are called wherever required. This approach gives more freedom to reuse the request and saves time. With this approach it is recommended to work with web custom requests.
48. What are the different types goals in Goal-Oriented Scenario?
LoadRunner has five different types of goals in Goal-Oriented Scenario.
- The number of concurrent Vusers
- The number of hits per second
- The number of transactions per second
- The number of pages per minute
- The transaction response time
49. How is each step validated in the script?
Each step in the script is validated with the content on the returned page. A content check verifies whether specific content is present on the web page or not. There are two types of content check which can be used in LoadRunner:
- Text Check: This checks for a text/string on the web page
- Image Check: This checks for an image on a web page.
50. How is VuGen script modified after recording?
Once the script is recorded, it can be modified with the following process:
- Variable declarations
- Rendezvous Point
- Validations/Check point
Get LoadRunner Training for Beginners From Real-Time Experts
- Instructor-led Sessions
- Real-life Case Studies
51. Define throughput and how it relates to response time?
Throughput refers to the no. of transactions produced over time during a test. It’s also expressed as the amount of capacity that a website or application can handle. When we compare it with response time, we will notice both of them decrease simultaneously. Similarly, the peak throughput and highest response time strike approximately at the same time.
52. What are the Elements in the Loadrunner Controller?
Title bar(name of the scenario presently working). Menu bar(selecting the various commands). Toolbar. Status bar.
53. Which function is used to end a nested transaction ?
The function is – lr_end_sub_transaction
54. 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
55. While the script is running we find some values that may need to be correlated? Is it possible to do manual correlation for those values?
NO. It’s not possible to do correlation when the script is running but you can make changes once the script has stopped.
56. 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 from the moment Vuser entered “running” state.
57. Does caching have a negative effect on your load testing results ?
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 affect the response times in your test. Hence, it is recommended to turn-off caching.
58. 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.
59. What is the difference between lr_error_message and lr_debug _message?
- lr_error_message: Sends a error message to the LoadRunner Controller’s Output window
- lr_debug _message: Sends a debug message to the LoadRunner Controller’s Output window
60. What is the difference between load , performance testing ?
The objective of 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.
61. You have created several Auto Correlation rules. A new tester on your team is preparing to record a group of scripts on the same application on his workstation. What can you do to provide the tester with the correlation rules?
I would export the AutoCorrelation rules to a .cor file, and then have the new team member import the .cor file into his Auto Correlation rules
62. You want to emulate a call center for an airline. All representatives login in the morning, perform their business processes, and log out at night. In one day, a representative will Create 40 flight reservations, Modify 10 flight reservations, and Search for 20 flight reservations. A representative cannot perform a Modify without performing a Search first. How would you design the run logic ?
Create – 67% Search – 16% Block0 – 17% Search Modify
63. Where should you add a web_reg_save_param function to a script?
Before the step that retrieves the dynamic value
64. What is wasted time in VuGen Replay log?
Waste time is never performed by any browser user and just the time spent on the activities which support the test analysis. These activities are related to logging, keeping record and custom analysis.
65. How do you enable text and image checks in VuGen?
This can be done by using functions web_find (for text check) and web_image_check (for image check) and enabling image and text check from run time setting.
Run Time Setting–>Preference–>Enable the Image and text check box.
66. What is the difference between web_reg_find and web_find?
web_reg_find function is processed before the request sent and is placed before the request in the VuGen script whereas web_find function is processed after the response of the request comes and is placed after the request in VuGen script.
67. What are the challenges that you will face to script the step “Select All” and then “Delete” for any mail account?
In this case the post for “Select All” and “Delete” will change every time depending on the number mails available. For this the recorded request for the two should be replaced with a custom request and string building is required to build the post. (Note- This question needs practical knowledge. So please this practically and formulate your answer).
68. What is the difference between pacing and think time?
Pacing is wait time between the action iterations whereas think time is wait time between the transactions.
69. How can we debug a LoadRunner script?
VuGen contains two options to debug Vuser scripts:
- Run Step by Step command and
We can also manually set the message class within your script using the lr_set_debug_message function.
70. You have an application which shows the exam results of the student. Corresponding to the name of each student it is mentioned whether he passed or failed the exam with the label of “Pass” and “Fail”. How will you identify the number of passed and failed students in VuGen script?
For this text check is used for the web page for the text “Pass and “Fail”. Through the function web_reg_find, we can capture the number of texts found on the web page with the help of “SaveCount”. SaveCount stored the number of matches found. For example-
71. 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.
- To do this, select the Continue on Error check box in the Miscellaneous run-time settings.
- Instruct VuGen to complete all execution in which 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.
72. During the load test what is the optimum setting for Logs?
For the load test log level is set to minimal. This can be achieved with setting the log level to the standard log and selecting the radio button “Send message only when an error occurs”.
73. How will you handle the situation in scripting where for your mailbox you have to select any one mail randomly to read?
For this we will record the script for reading the first mail. Try to find what is being posted in the request to read the first mail such as mail ids or row no. From the post where a list of mails is reflecting, we will try to capture all the email ids row no with correlation function and keeping Ordinal as All i.e. ORD=All . Replace the requested email id in the read post with any of the randomly selected email id from the list of captured email ids.
74. What is the Think Time? What is the Threshold level for think time and how can this change?
Think time is the wait time inserted intentionally between the actions in the script to emulate real users’ wait time while performing activity on the application. The Threshold level for Think time is the level below which recorded think time will be ignored. This can be changed from Recorded options->Script->Generate think time greater than threshold.
75. How is Automated Correlation configured?
Any setting related to Automated Correlation can be done by General Options-> Correlation. Correlation rules are set from Recording options->Correlations.
76. What are the capabilities exactly you look for while selecting the performance testing tool?
Performance testing tool should capable of :
- Testing an application built using multiple technologies and hardware platforms.
- Determine the suitability of a server for testing the application
- Testing an application with loads of tens, thousand and even thousands virtual users.
77. How concurrent users are differing from simultaneous users?
All simultaneous users are concurrent users but vice versa is not true.
All the vusers in the running scenario are Concurrent users as they are using the same application at the same time but may be or may not be doing the same tasks. Simultaneous users perform the same task at the same time. Concurrent users are made Simultaneous users through rendezvous points. Rendezvous points instruct the system to wait till a certain number of vusers arrive so that they all can do a particular task simultaneously.
78. How do you identify which values need to be correlated in the script? Give an example.
This can be done in ways:
- Record the two scripts with similar steps and compare them using WDiff utility.
- Replay the recorded script and scan for correlation. This gives a list of values that can be correlated.
Session Id is a good example of this. When two scripts are recorded and compared using WDiff utility. Session ids in the two scripts should be different and WDiff highlight these values.
79. How does caching affect performance testing results?
When data is cached in server`s memory, the server need not fetch the result and no server activity triggered. Test result does not reflect the same performance of the real user using the application with different data.
80. How will you stop the execution of the script on error?
This can be achieved through lr_abort function. The function instructs the vuser to stop executing the Action section and end the execution by executing the vuser_end section. This function is helpful in handling a specific error. This can also be used to handle a situation rather than error where execution is not possible. The function assigned “Stopped” status to the vuser which stopped due to the lr_abort function. In the Run-Time setting, “Continue on error” should be unchecked.
81. You want to have each step in your script measured as a transaction in the Controller and not shown in the Replay Log in VuGen. How can you accomplish this?
This can be done by enabling the automatic transaction in the Run-time settings
82. Which web protocol recording level generates the web_submit_form function?
The URL protocol generates this function.
83. 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 an application as it avoids the server from caching results.
84. While scripting you created correlation rules for Automatic Correlation. If you want to share the correlation rules with your team members working on the same application so that he/she can use the same on his workstation, how will you do that?
Correlation rules can be exported through the .cor file and the same file can be imported through VuGen.
85. What is the analyzer in LoadRunner?
This gives you the results of the load runner test. These results can be viewed in graphs and reports.
86. What are Ramp-up and Ramp Down?
- Ramp-up: Rate at which virtual users add to the load test.
- Ramp Down: Rate at which virtual users exit from the load test.
87. Enlist some alternative to LoadRunner?
Some of the alternatives to the LoadRunner are:
- Apache JMeter: An open-source java application.
- Locust: An open-source load testing python tool.
- Gatling: An open-source load testing tool based on Netty, Akka, and Scala.
- Loader.io: Cloud-based load testing service.
- OctoPerf: A SaaS load testing solution.
- Some other alternatives are Low Orbit Ion Cannon, Flood.io, Load Impact, blitz.io, and Fast DDoS Attack Cmd.
88. What is the number of graphs you can monitor using a 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 that can be monitored at a time is 8.