Loadrunner Interview Questions and Answers
Last updated on 25th Sep 2020, Blog, Interview Question
These LoadRunner Interview Questions may act as a booster for a fresher to grab quickly the basic understanding of performance testing through LoadRunner. For an experienced performance tester, these interview questions will help to recall the basics which they have already learnt. Following are the LoadRunner Interview Questions:
1. What is the difference between Performance Testing and Performance engineering?
In Performance Testing, testing cycle includes requirement gathering, scripting, execution, result sharing, and report generation. Performance Engineering is a step ahead of Performance Testing where after execution; results are analyzed with the aim to find the performance bottlenecks and the solution is provided to resolve the identified issues.
2. Explain Performance Testing Life Cycle.
Step 1: System Analysis (Identification of critical transaction)
Virtual User Generator
Step 2: Creating Virtual User Scripts (Recording)
Step 3: Defining Users Behavior (Runtime setting)
Step 4: Creating Load Test Scenarios
Step 5: Running the Load Test Scenarios and Monitoring the Performance
Step 6: Analyzing the Results
3. What is Performance Testing?
Performance Testing is done to evaluate the application’s performance under load and stress conditions. It is generally measured in terms of the response time of the user’s action on an application.
4. What is Load Testing?
Load Testing is to determine if an application can work well with the heavy usage resulting from a large number of users using it simultaneously. The load is increased to simulate the peak load that the servers are going to take during maximum usage periods.
5. What are the different components of LoadRunner?
The major components of LoadRunner are:
- VUGen: Records Vuser scripts that emulate the actions of real users.
- Controller: Administrative center for creating, maintaining and executing load test scenarios. Assigns scenarios to Vusers and load generators, starts and stops loading tests.
- Load Generator: An agent through which we can generate load
- Analysis: Provides graphs and reports that summarize the system performance
6. 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 the Rendezvous point. Once designated numbers of Vusers reach it, the Vusers are released. Function lr_rendezvous is used to create the Rendezvous point. This can be inserted by:
- 1. Rendezvous button on the floating Recording toolbar while recording.
- 2. After recording Rendezvous point is inserted through Insert> Rendezvous.
7. What are the different sections of the script? In what sequence do these sections run?
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 of 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. The action is executed in between the two.
8. How do you identify which protocol to use for any application?
Previously Performance testers had to depend much on the development team to know about the protocol that the application is using to interact with the server. Sometimes, it also used to be speculative.
However, LoadRunner provides great help in the form of Protocol Advisor from version 9.5 onwards. Protocol advisor detects the protocols that the application uses and suggests to us the possible protocols in which script can be created to simulate the real user.
9. What is a 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 a different user). In both 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 a 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.
10. How to identify what to correlate and what to parameterize?
Any value in the script that changes on each iteration or with the different users while replaying needs correlation. Any user input while recording should be parameterized.
11. 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.
12. How do you identify Performance test use cases of any application?
Test cases/Uses cases for Performance tests are almost the 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 the 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 of having less user activity is generally omitted from the Performance testing point of view. For Example, admin account activity.
Any of the Manual test cases that fulfill the above criteria can be used as a 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.
Subscribe For Free Demo[contact-form-7 404 "Not Found"]
13. 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.
14. What are different types of Vuser logs that 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 the 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.
15. What is the Modular approach of scripting?
In the Modular approach, a function is created for each request (For Example, 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.
16. What are the different types of goals in Goal-Oriented Scenario?
LoadRunner has five different types of goals in Goal-Oriented Scenario. These are:
- 1. The number of concurrent Vusers
- 2. The number of hits per second
- 3. The number of transactions per second
- 4. The number of pages per minute
- 5. The transaction response time
17. How is each step validated in the script? (OR) What is the need of Checkpoints in LoadRunner?
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 a 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.
18. How is the VuGen script modified after recording? (OR) How can we edit the Vuser Script?
Once the script is recorded, it can be modified with the following process:
- 1. Transaction
- 2. Parameterization
- 3. Correlation
- 4. Variable declarations
- 5. Rendezvous Point
- 6. Validations/Checkpoint
19. 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.
20. What is the advantage of running the Vuser as the thread?
Running Vusers as thread helps generate more virtual users from any machine due to the small memory print of the Vuser running a thread.
21. What is waste time in the 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.
22. 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 runtime settings.
Run Time Setting–>Preference–>Enable the Image and text checkbox.
23. 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 a web_find function is processed after the response of the request comes and is placed after the request in VuGen script.
24. 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 of mails available. For this the recorded request for the two should be replaced with the custom request and string building is required to build the post.
25. What is the difference between pacing and thinking time?
Pacing is the wait time between the action iterations whereas thinking time is a wait time between the transactions.
26. 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.
27. You have an application that 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 the 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.
- web_reg_find(“Text=Pass”, “SaveCount=Pass_Student”, LAST);
- web_reg_find(“Text=Fail”, “SaveCount=Fail_Student”, LAST);
28. 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 by setting the log level to the standard log and selecting the radio button “Send a message only when an error occurs”.
29. 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 emails 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.
30. What is the Think Time? What is the Threshold level for think time and how can this be changed?
Think time is the wait time inserted intentionally between the actions in the script to emulate real users’ wait time while performing an 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 the threshold.
Get LoadRunner Training for Beginners From Real-Time Experts
- Instructor-led Sessions
- Real-life Case Studies
31. How is the Automated Correlation configured?
Any setting related to Automated Correlation can be done by General Options->Correlation. Correlation rules are set from Recording options->Correlations.
32. How do you decide the number of load generator machines required to run a test?
The number of load generators required totally depends on the protocol used to create the script and configuration of the load generator machine. Each protocol has a different memory print and this decides how many virtual users can be generated from the given configuration of the machine (load generator).
33. 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 a load of tens, thousand and even thousands of virtual users.
34. How are concurrent users 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 maybe 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 until a certain number of Vusers arrive so that they all can do a particular task simultaneously.
35. What are Vusers and Vuser scripts?
Virtual users imitate a human using the application. And perform actions on the application just like a human would have done. When workstations allow only one single human user to work, many Vusers can concurrently work on a single workstation.
It is the script that keeps all the actions performed by the Vuser to complete the specific task. Each Vuser invokes a Vuser script when we run a scenario. Vuser script also defines a function to track the performance of the application.
36. 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.
6.3. 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.
Using LR online run-time, transaction resources, database resources and firewall resources can be monitored.
It produces graphs and reports. You can use them to analyze the performance of an application.
37. Which LoadRunner Component does the recording of the performance test scenario?
The Virtual User Generator (VuGen) component allows recording of a script. It enables to define Vuser scripts for a variety of application types and communication protocols.
38. Define rendezvous point with an example?
Rendezvous points are used to emulate heavy user load on the server. They instruct Vusers to wait during test execution to enable multitasking.
For example, in an e-commerce application, rendezvous points are added for 1000+ users to bid for a product simultaneously.
39. What is the size of VUsers required for load testing?
The size of VUsers for load testing depends on the following parameters.
- System under test (SUT),
- Network configurations,
- Hardware settings,
- Available memory, and
- Operating system.
Hence there cannot be any generic value for Vuser.
40. What is the advantage of running Vuser as a process rather than a thread?
When Vuser is run as a process, the copy of the driver program is loaded into memory for each request. This requires a large amount of memory and limit the number of Vusers on a single generator.While Vuser is run as a thread,
While Vuser is run as a thread, the single instance of the driver program facilitates multiple Vusers. You can run more no. of Vusers on a single generator in the multi-threaded mode.
41.What constitutes a performance test scenario?
A scenario is a sequence of events, or situation, based on certain assumptions and factors (variables) chosen by its creator. For example, a scenario defines-
- The no. of users.
- Action to be performed.
- Virtual machines system.
42. Define throughput and how does it relate 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.
43. What is the purpose of an extended log?
An extended log is expected to convey the following information.
- Data returned by the server and any of the advanced traces if available.
- Parameter substitution.
- Other information depending on the options you select in LoadRunner settings.
44. What are the different types of vUser logs and state the differences?
There are two kinds of vUser logs in LoadRunner, the standard and extended logs. Standard log redirects a subset of functions and messages to the output log. The subset of functions depends on the Vuser type.
However, the extended log captures detailed execution messages into the output log. It is mostly used when the user needs some debug information about parameter substitution.
45. How do you find database related issues?
By running Database monitor and using Data Resource Graph we can find database related issues. E.g. You can specify the resource you want to measure on before running the controller and then you can see database related issues .
Enroll in Advanced LoadRunner Certification Course & Build Your SkillsWeekday / Weekend BatchesSee Batch Details
46. How do you define think time in LoadRunner?
Think time corresponds to the user delay between two subsequent requests.
For example, a user opens a page1 and starts filling the data on page1. Assume the user took 10 sec to fill the data. After that, he submitted page1, and page2 gets loaded. In this case, the user has waited for 10 sec between page1 and page2. Hence the think time here is 10 sec.
47. How did you find web server related issues?
Using Web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits per second that occurred during the scenario, the number of http responses per second, the number of downloaded pages per second.
48. What is the significance of Correlation? Also, highlight automatic correlation.
Correlation is a technique where dynamic values are not hard-coded in your script but are extracted at run-time to avoid failure. The dynamic value could change for each user action or for different users. In both the cases, correlation takes care of these values. And it prevents them from failing during execution.
Automated correlation works on predefined correlation rules. The script is played back and scanned for auto-correlation upon any failure. Vugen identifies the place wherever the correlation rules work and correlates the value of approval.
49. What is Manual Correlation?
Manual Correlation involves the following actions.
- Identify the dynamic value.
- Find the first occurrence of dynamic value.
- Identify the unique boundaries to capture the dynamic value.
- Write the correlation function “web_reg_save_param” before the request gets the first occurrence of dynamic value in response.
- This correlation technique uses the 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.
50. 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.
51. What is the difference between transaction and transaction instance in LoadRunner?
A transaction is used to measure the time between executions of certain statements. While a transaction instance is used for performance analysis.
52. What is a rendezvous point?
You insert rendezvous points into Vuser scripts to emulate heavy user load on the server. 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. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.
53. 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.
54. 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.
55. What is correlation? Explain the difference between automatic correlation and manual 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.
56. How do you find out where correlation is required?
Two ways are there:
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.
57. 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.
58. What is a function to capture dynamic values in the web Vuser script?
Web_reg_save_param function saves dynamic data information to a parameter.
59. What are Scenarios ?
Scenarios encapsulate the Vuser Groups and scripts to be executed on load generators at run-time.
Manual scenarios can distribute the total number of Vusers among scripts based on the analyst-specified percentage (evenly among load generators).
Goal Oriented scenarios are automatically created based on a specified transaction response time or number of hits/transactions-per-second (TPS). Test analysts specify the % of Target among scripts.
60. How do you debug a LoadRunner script?
VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and breakpoints. The Debug settings in the Options dialog box allow us to determine the extent of the trace to be performed during scenario execution. The debug information is written to the Output window. We can manually set the message class within your script using the lr_set_debug_message function. This is useful if we want to receive debug information about a small section of the script only.
61. 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*)
62. What are the changes you can make in run-time settings?
The Run Time Settings that we make are:
- 1. Pacing – It has iteration count.
- 2. Log – Under this we have Disable Logging Standard Log and
- 3. Extended Think Time – In think time we have two options like Ignore think time and Replay think time.
- 4. General – Under general tab we can set the vusers as process or as multithreading and whether each step as a transaction.
63. Where do you set Iteration for Vuser testing?
We set Iterations in the Run Time Settings of the VuGen. The navigation for this is Run time settings, Pacing tab, set number of iterations.
64. What is Ramp up? How do you set this?
This option is used to gradually increase the amount of Vusers/load on the server. An initial value is set and a value to wait between intervals can be specified. To set Ramp Up, go to ‘Scenario Scheduling Options’
65. If you want to stop the execution of your script on error, how do you do that?
The lr_abort function aborts 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. This function is useful when you need to manually abort a script execution as a result of a specific error condition. When you end a script using this function, the Vuser is assigned the status “Stopped”. For this to take effect, we have to first uncheck the Continue on error option in Run-Time Settings.
66. What is the relation between Response Time and Throughput?
The Throughput graph shows the amount of data in bytes that the Vusers received from the server in a second. When we compare this with the transaction response time, we will notice that as throughput decreased, the response time also decreased. Similarly, the peak throughput and highest response time would occur approximately at the same time.
67. If web server, database and Network are all fine where could be the problem?
The problem could be in the system itself or in the application server or in the code written for the application.
68. What is the difference between Overlay graph and Correlate graph?
Overlay Graph: It overlay the content of two graphs that share a common x-axis. Left Y-axis on the merged graph shows the current graph’s value & Right Y-axis shows the value of the Y-axis of the graph that was merged.
Correlate Graph: Plot the Y-axis of two graphs against each other. The active graph’s Y-axis becomes the X-axis of the merged graph. The Y-axis of the graph that was merged becomes the merged graph’s Y-axis.
69. What are reports provided by the analysis window?
After running a scenario, we can view reports that summarize the system’s performance. The analysis provides following reports:
SUMMARY REPORT – provides general information about the scenario run. We can view the summary report at any time from the analysis window.
HTML REPORT – the analysis creates an HTML report for each one of the open graphs.
TRANSACTION REPORTS – provides performance information about the transaction defined within the Vuser scripts. These reports give a statistical breakdown of results and allow printing and exporting the data.
70. How can we record VUser Scripts using VUGen?
Ans:VuGen is used to generate the VUser Script by recording. We can record the user’s action which user performed on the application to complete the specific task. This generated VUser Script can be sent to the server by calling the server API. When a user communicates directly with the server, system resources are not used on a user interface. This lets you run a large number of Vusers on a single workstation.
- 1. Open virtual user generator.
- 2. Select the protocol for recording.
- 3. Click on start recording.
- 4. Enter the URL of the application for recording.
- 5. Record all steps for the scenario.
71. What is the advantage of running the Vuser as thread?
The advantages of running a VUser are following:
- 1. Vusers support multi threaded environments.
- 2. Using this multi threaded environment we can run more Vusers per load generator.
- 3. 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.
- 4. Sharing of memory takes place between each thread, helping in running of more Vusers per generator.
72. 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.
Are you looking training with Right Jobs?Contact Us
- BizTalk Server Tutorial
- Selenium Interview Questions and Answers
- Azure DevOps Tutorial
- Selenium with Python Interview Questions and Answers
- Jmeter Interview Questions and Answers
- What is Dimension Reduction? | Know the techniques
- Difference between Data Lake vs Data Warehouse: A Complete Guide For Beginners with Best Practices
- What is Dimension Reduction? | Know the techniques
- What does the Yield keyword do and How to use Yield in python ? [ OverView ]
- Agile Sprint Planning | Everything You Need to Know