Monday, December 12, 2016

Performance Testing Interview Questions and Answers

what criteria did you use to select web transactions for  load testing ?
This is mostly given by BAs by analyzing most frequently used positive business scenarios with high volume. Sometimes based on production logs they analyze scenarios and provide.These scenarios should functionally work.

For what purpose are the virtual users created ?
Virtual users are created to emulate real users on application . Manually representing required load  we need lot of resources and man power ,which is not cost effective and not productive .So virtual users behave as real users and they perform business transactions on application .

why it is recommended to add verification checks to all your scenarios ?
To validate server response under heavy load we need verification points. Using verification point  we can validate correct response is displaying or not under load.Because some times transaction passes but manually you may get error.To avoid this kind of scenarios we need verification points in load runner. We have text and image check points in loadrunner.

In what situation would u want to parameter a text verification check ?
When we have same text more than once on page and to validate the same text multiple times we can parameterize and save the the value with save count function  to use text verification points.


why do u need a parameterize fields in ur virtual user script ?
We need to parameterize the values to avoid caching and achieving correct response time .If we use same data again and again ,those values will be stored in cache results will be displayed quickly. Some applications may not allow multiple session for same logins.so it is better to parameterize as much as to test as real time environment.

How can data catching have a negative effect on load testing results ?
As explained in above answer with caching we may not get correct response time ,it gives wrong analysis about application behavior,estimation and tuning. But caching is very helpful in database,app server and web server to avoid unnecessary load .So server side caching always suggestable.But browser cache should be cleared most of time to mimic real user behaviour.

 what usually indicates that ur virtual user script has dynamic data that is dependent on u parameterized fields?
Correlation is helpful to capture dynamic data and paramerize. Two types of correlation are available 1) Auto 2) Manual . Now a days most tools provide efficient auto correlation feqtue still that is not 100% solution.Always prefer manual correlation for robust scripting.


what are the benifits of creating multiple actions within any virtual user script ?
With multiple actions  in script ,script maintenance will  be reduced when you want to run with different scenarios . Avoid always enabling and disabling commenting portion of script for each run.Increase molecularity,so we can run quickly with out much changes in script .

what is the use of "swing time" in Load Runner?


What is visual recorder in Load Runner?
 virtual recorder is one of the load runner component  which we use to record any given application with appropriate protocol. Basically with virtual recorder we can record and generate script .And do modifications to script like correlation and parameterization .

what is Rendezvous Point?
Rendevous Point instructs Vusers To wait till all vusers  come to a certain point and proceed together.When you want to test login scenario with 1000 users ,as we can not ramp up 1000 users at the same using Rendezvous Point we instruct all the vusers until 1000 vusers reach same point.Once 1000 users reach same point then the desired transaction would be executed.



what are the parameters in Load Runner?
 LoadRunner parameter is a special variable.Each time we can send different date for same set fo transactions. There is  different type of parameters in LoadRunner, those are
File
Date/time
Group Name
Iteration Number
Load Generator Name
Random Number
Table
Unique Number
User Defined Function
Vuser ID
XML

what is mutation testing?
Mutation is comes under white box testing. mutation is nothing but a complex change in coding.In this we r forcibly making some changes in the coding and checking whether it gives the correct (or) wrong results. if it give wrong result then our test is passed and if it give correct  result then the test is failed.

How many types of scripts generated in LoadRunner?What are  they?
 LR has different protocols and it creates different type of script for each protocol. Ex : Http/Html. Citrix,Oracl,Java ,Peoplesoft,SAP like that


What are the End to End scenario's you are following in your company in loadtesting or Performance testing ?

 End To End Flow is:
Non-Functional Requirement Collection: which includes the environment, server and database and some other requirements which helps to analyse the existing/new application.
Test script creation.
Work Load Design: which tells about the user distribution.
Test Execution.
Analysis of results.
Reporting/Documentation.
Conclusion of the test(any bottlenecks, performance tuning and etc).

 What is the difference between Set_window() and _set_window()?
 Set_window receives windows logical name whereas
_set_window receives the physical description

1) Which protocols are supported by Loadrunner ?
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.
2) Which components have you used in Loadrunner ?
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.
3) What is load runner Agent.
Agent is interface between host machine and controller
4) What is the process for developing a Vuser Script ?
There are 4 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 Video tutorial here.
5) 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 can not be any generic value for Vuser.
6) 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.
7) What is the significance of "Vuser-init "?
Vuser-init records the pre-operations also called the initialization operations before the actual application is run.
8) What is 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.
9) Why do you create parameter?
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 server from caching results.
Learn more about parameterization in this Video Tutorial
10) 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 Logining into Application, another Action for booking and so on.
Actions increase code reusability, reduce maintenance time and hence, decrease costs.
11) 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.
Learn more about Controller  & Scenario creation
12) What are monitors?
Monitors are used to "monitor" performance bottlenecks. They are used in Controller section of Load Runner
13) What are the types of check points is available in LoadRunner?
Loadrunner provides two types of check points
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
14) What kind of problem we can face regarding hardware, software,  network and memory bottleneck during the performance test?
The possible issues amongst others could be -
1. Lack of Hardware
2. Memory Leakage
3. Network related issues.
4. Application/Software error
15) What would be your recommendation to improve performance measure?
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.
16) What is 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 particular portion of the scenario and test the behavior of the application.
17) 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.
Learn more about Correlation in this video tutorial.
18) 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 your playback your script to verify that correlation is done successfully.
Learn Manual Correlation.
19) 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
20) Which function is used to end a nested transaction ?
The function is -  lr_end_sub_transaction
Learn More about Transactions in this video.
21) 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
22) While the script is running we find some values that may be need to be correlated? Is it possible to do manual correlation for those values?
NO. Its not possible to do correlation when script is running but you can make changes once script has stopped.
23) 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.
24) Does caching have a negative effect on your load testing results ?
Yes. Caching has a negative effect. Cache is 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.
25) 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.
Learn more about Analyzer
26) 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
27) What is the difference between load , performance  testing ?
The objective of performance testing is to check whether an application loads/updates  within stipulate 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.
28) 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 Auto Correlation rules to a .cor file, and then have the new team member import the .cor file into his Auto Correlation rules
29) 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
30) Where should you add a web_reg_save_param function to a script?
Before the step that retrieves the dynamic value
31) 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
32) Which web protocol recording level generates the web_submit_form function?
The URL protocol generates this function.
33) What is load testing?
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.
34) What is load runner?
Load Runner is a performance testing tool from HP. This tool supports all aspects such as Load, Stress, Endurance, data volume and spike Testing.
35) What are all the components of LoadRunner?
Following are the components of LoadRunner
  • The Virtual User Generator
  • Controller, and the Agent process
  • LoadRunner Analysis and Monitoring
  • LoadRunner Books Online
36) 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.
37) What is a rendezvous point?
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.
38) What is a scenario?
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
39) How can we debug a LoadRunner script?
VuGen contains two options to debug Vuser scripts
  • Run Step by Step command and
  • Breakpoints.
We can also manually set the message class within your script using the lr_set_debug_message function.
40) How can we perform functional testing under load?
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.
41) What is the relationship between Response Time and Throughput?
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.
42) What does vuser_init and vuser_end action contain?
Vuser_init action contains procedures to login to a server and Vuser_end section contains log off procedures.
43) What is the difference between standard log and extended log?
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 user needs information about Parameter substitution.
44) What are all the types of Goals in Goal-Oriented Scenario of Load Runner?
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
45) What is a function to capture dynamic values in the web vuser script?
Web_reg_save_param is the function that saves dynamic data information to a parameter.
46) What are the Load Runner testing process?
Following are the testing process in LoadRunner:
  • Plan load test
  • Create Vuser Scripts
  • Define Scenario
  • Run Scenario
  • Analyze results
47) What is remote command launcher?
The remote command launcher enables the controller to start applications in the host machine.
48) How can we develop the database vuser script?
Vuser scripts can be developed either by recording with the load vuser script generator or by using Load runner vuser script template.
49) How do you load a load runner Agent?
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.
50) What is the difference between hits/second and requests/second?
Hits per second means 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.
51) What are the advantages of load runner?
Following are the advantages of Load Runner:
  • Reduces human intervention
  • Reduces the requirement of the systems
  • Helps in the better usage of time and money
  • Effective utilization of automation
  • Single point execution
52) What is the vuser in the scenario?
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.
53) 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.
54) What are the changes that can be made to run-time settings?
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 replayed.
  • General:  Allows the setting of Vusers for processes or multithreading.
55) 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.
56) How many types of graphs are available in LoadRunner?
There are 5 types of graphs:
  • Network delay time graph – displays the time that elapses between request and response
  • Two transaction response time graphs – one transation 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
57) How can performance bottlenecks can be identified?
Monitors can be used to detect 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 increase in response time and throughput, network delays, performance response time, hits/second, etc.
58) What is ramp up and how it can be set?
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.
59) How correlation can be performed?
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.
60) Where are automatic correlation options set?
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.
61) 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.
62) What is the difference between Overlay graph and Correlate graph?
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.
63) What are the three sections of a Vuser script and what is the purpose of each one?
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.
64) What are the four selection methods when choosing data from a data file?
Following are the four selection methods:
  • Sequential
  • Random
  • Unique
  • Parameter name
65) What should be done to view parameter substitution in the Execution Log?
Parameter substitution can be viewed in the extended log in the Run time settings.
66) What tools are required to analyze Vuser run results?
Following tools are required to analyze Vuser run results:
  • Execution Log
  • Run-Time Viewer and
  • Mercury Test Results window
67) What is difference between Manual scenario and Goal oriented scenario?
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
68) What are all the reasons to use the Server Resources Monitor?
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.
69) What is the purpose of selecting ‘Show browser’ during replay in the General Options settings?
‘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.
70) For what purpose, User will be using ‘continue on’ error?
Continue on should be set only when making Execution Logs more descriptive or adding logic to the Vuser.
71) What is the purpose of a LoadRunner transaction?
The purpose of a Load Runner transaction is to measure one or more steps/user actions of a business process.
72) Why do you create parameters?
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.
73) What is lr_output_message?
The lr_output_message is a function that sends notifications to the Controller Output window and to the Vuser log file.
74) In a Web server, Database and Network are all working fine and now, 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.
75) What is VuGen Recording and Scripting? 
LoadRunner script code is obtained by recording in the ANSI C language syntax and it can be viewed in the script view.
76) What is Performance testing in LoadRunner? 
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 timeframe. In a multi user environment, it is necessary to determine the effect of multiple transactions on the timing of a single transaction.
77) What is the Configuration of systems when using Load Runner? 
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.
78) What is the use lr_abort function?
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.
79) What is think time?
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.
80) How Load Runner interacts with the application?
Protocol is used in Load Runner to interact with the application.
81) What is the latest version and language used in Load Runner?
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
82) What are all the important protocols that Load Runner supports?
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
 

Q #1. What is the difference between Performance testing and Performance engineering?
Ans => 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.
Q #2. Explain Performance Testing Life Cycle.
Ans => 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)
LoadRunner Controller
Step 4: Creating Load Test Scenarios
Step 5: Running the Load Test Scenarios and Monitoring the Performance
LoadRunner Analysis
Step 6: Analyzing the Results
Refer Performance Testing Tutorial #2 for more details.
Q #3. What is Performance testing?
Ans => Performance testing is done to evaluate application`s performance under load and stress conditions. It is generally measured in terms of response time of user’s action on application.
Q #4. What is Load testing?
Ans => 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. Load is increased to to simulates the peak load that the servers are going to take during maximum usage periods.
Q #5. What are the different components of LoadRunner?
Ans => 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
Q #6. What is the Rendezvous point?
Ans => 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:
  1. Rendezvous button on the floating Recording toolbar while recording.
  2. After recording Rendezvous point is inserted through Insert> Rendezvous.
Q #7. What are the different sections of the script? In what sequence does these section runs?
Ans => 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.
Q #8. How do you identify which protocol to use for any application?
Ans => 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 form of Protocol Advisor from version 9.5 onwards. Protocol advisor detects the protocols that application uses and suggest us the possible protocols in which script can be created to simulate the real user.
Q #9. What is correlation? Explain the difference between automatic correlation and manual correlation?
Ans => 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 auto correlation on failing. Vugen identifies the place wherever the correlation rules work and correlate the value on approval.
Refer this tutorial for more details.
Q #10. How to identify what to correlate and what to parameterize?
Ans => Any value in the script that changes on each iteration or with different user while replaying needs correlation. Any user input while recording should be parametrized.
Q #11. What is parameterization & why is parameterization necessary in the script?
Ans => 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.
Refer this tutorial for more details.
Q #12. How you identify Performance test use cases of any application?
Ans => 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:
I. The user activity should be related to critical and most important functionality of the application.
II. The user activity should be having good amount of database activity such as search, delete or insert.
III. 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 , Performance team should create dedicated documents for them.
Q #13. While scripting you created correlation rules for automatic correlation. If you want to share the correlation rules with your team member working on the same application so that he/she can use the same on his workstation, how will you do that?
Ans => Correlation rules can be exported through .cor file and the same file can be imported through VuGen.
Q #14. 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?
Ans => 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 of warnings and other messages. Logging is used during debugging and disabled while execution. Logging can be enabled for errors in that case.
Q #15. What is Modular approach of scripting?
Ans => In 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 request.
Q #16. What are the different types goals in Goal-Oriented Scenario?
Ans => LoadRunner has five different types of goals in Goal-Oriented Scenario. These are:
  • 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
Q #17. How is each step validated in the script?
Ans => 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.
Q #18. How is VuGen script modified after recording?
Ans => Once the script is recorded, it can be modified with the following process:
Transaction
Parameterization
Correlation
Variable declarations
Rendezvous Point
Validations/Check point
Q #19. What is Ramp up and Ramp Down?
Ans => Ramp up- Rate at which virtual users add to the load test
Ramp Down- Rate at which virtual users exit from the load test.
Q #20. What is the advantage of running the Vuser as thread?
Ans => Running vusers as thread helps generate more virtual users from any machine due to small memory print of the vuser running as thread.
Q #21. What is wasted time in VuGen Replay log?
Ans => 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.
Q #22. How do you enable text and image checks in VuGen?
Ans => 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.
Q #23. What is the difference between web_reg_find and web_find?
Ans => 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 come and is placed after the request in VuGen script.
Q #24. What are the challenges that you will face to script the step “Select All” and then “Delete” for any mail account?
Ans => 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 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).
Q #25. What is difference between pacing and think time?
Ans => Pacing is wait time between the action iterations whereas think time is wait time between the transactions.
Q #26. What are the number of graphs you can monitor using Controller at a time? What is the max of them?
Ans => 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.
Q #27. You have an application which shows the exam results of the student. Corresponding to name of each student its 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 student in VuGen script?
Ans => 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-
1web_reg_find("Text=Pass",
2 "SaveCount=Pass_Student",
3 LAST);
4 web_reg_find("Text=Fail",
5 "SaveCount=Fail_Student",
6 LAST);
Q #28. During the load test what is the optimum setting for Logs?
Ans => 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”.
Q #29. How will you handle the situation in scripting where for your mailbox you have to select any one mail randomly to read?
Ans => 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.
Refer this Scripting Tutorial.
Q #30. What is the Think Time? What is the Threshold level for think time and how can be this changed?
Ans => Think time is the wait time inserted intentionally between the actions in the script to emulate real user`s wait time while performing activity on the application. The Threshold level for Think time in the level below which recorded think time will be ignored. This can be changed from Recorded options->Script->Generate think time greater than threshold.
Q #31. How is Automated Correlation configured?
Ans => Any setting related to Automated Correlation can be done by General Options->Correlation. Correlation rules are set from Recording options->Correlations.
Q #32. How you decide the number of load generator machine required to run a test?
Ans => Number of load generator required totally depends on the protocol used to create the script and configuration of the load generator machine. Each protocol has different memory print and this decides how many virtual users can be generated from the give configuration of the machine (load generator).
Q #33. What are the capabilities exactly you look for while selecting the performance testing tool?
Ans => 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 load of tens, thousand and even thousands virtual users.
Q #34. How concurrent users are differing from simultaneous users?
Ans => 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.
Q #35. How do you identify which values need to be correlated in the script? Give an example.
Ans => This can be done in ways:
a) Record the two scripts with similar steps and compare them using WDiff utility. (See tutorial Correlation).
b) 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.
Q #36. How does caching affect performance testing results?
Ans => 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 real user using the application with different data.
Q #37. How will you stop the execution of script on error?
Ans => This can be achieved through lr_abort function. The function instructs the vuser to stop executing 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 lr_abort function. In Run-Time setting, “Continue on error” should be unchecked.




25 LoadRunner Interview Questions and Answers



In this article, we’ve covered the 25 most frequently asked LoadRunner interview questions and answers. The reason we picked this topic is because the performance of a web application is critical for its business. And the stakeholders would use all means to improve it. LoadRunner is one of the best performance testing tools which many large organizations use.
However, to measure the performance of any web application, there are many performance monitoring solutions available in the market. But LoadRunner is the leader amongst them, so most IT companies prefer it. Also, being a QA engineer, performance testing is the area where a tester can expect huge growth. That’s why we’ve compiled the list of LoadRunner interview questions to help in clearing the performance testing interview.
For ease, we’ve split the LoadRunner interview questions between two parts. The first part will provide the theoretical knowledge about the LoadRunner. And in the second one, you’ll get to learn the basics of configuration and usage of the application.
Just to be precise, below are the key reasons we came up with this unique set of LoadRunner interview questions.
1- It is one of the best and certified performance testing tools in the industry.
2- It is compatible with most of the upcoming technologies because of the wide range of supported protocols.
Before we begin, please go through the three important pre-requisites as mentioned below.
It is because merely reading through the list of LoadRunner interview questions wouldn’t help, you should know about its configuration too.
1- You must know the exact version of LoadRunner that you are working with.
2- If you’ve work experience with an earlier version, keep yourself updated with the features of the newer versions.
3- Sometimes you may have to write script during an interview. So get prepared for the same.
Dear testers just for your information, we have recently published top questions and answers articles related to manual QA and Selenium testing interviews. If anyone of you is interested, then please go through the below links.
Let’s now dive in and explore the top 25 LoadRunner interview questions and answers.

Top 25 LoadRunner interview questions and answers.

LoadRunner Interview Questions with Answers for Experienced QA
25 LoadRunner Interview Questions.
Question-1. What are different types of Performance testing?
Answer.
Performance testing certifies the performance of any web application under the load and stress conditions. Usually, we measure the system performance in terms of its response time for the user activity.
At the onset, start it in the standalone mode and then do it in a multi-user environment, also observe the effect of multiple transactions vs. single transaction.
Types of Performance Testing.
1.1. Load.
To test if an application works fine with the loads that result from a large number of simultaneous users and transactions.

1.2. Stress.
To examine application behavior under peak usage periods.
1.3. Capacity.
To measure the overall capacity and to determine when the response time turns unacceptable.

Question-2. What are the notable testing solutions for performance testing?
Answer.
Following are some notable commercial testing tools used widely in the testing sphere.
2.1. LoadRunner(HP).
It’s meant for the Web and other applications. It can operate in a variety of application environments, platforms, and databases. It can employ a no. of server monitors to evaluate the performance measurement of each component and tracking of bottlenecks.
2.2. QAload(Compuware).
It’s mainly used for load testing of Web, database and char-based system.
2.3. WebLoad(RadView).
It allows comparing the running tests vs. test metrics.
2.4. Rational Performance Tester (IBM).
It specializes in identifying the presence and cause of system performance bottlenecks.
2.5. Silk Performer (Borland).
It can predict the ideal behavior of an e-business environment before being deployed, regardless of the size and complexity.

Question-3. What is load runner and what types of testing it can perform?
Answer.
Load Runner is a performance testing tool from HP. This tool supports all aspects such as Load, Stress, Endurance, data volume and spike Testing.
Question-4. What are the main components of Load Runner?
Answer.
Load Runner contains the following components.
4.1. Virtual User Generator.
It captures end-user business process and creates an automated performance testing scripts, known as Vuser script.
4.2. Controller.
Organizes, drives, manages and monitor the load test.
4.3. Load generators.
Creates the load by running Vusers.
4.4. Analyzer.
Helps to view, dissect and compare the performance results.
4.5. Launcher.
Provides a single point of access for all of the LoadRunner components.

Question-5. What are Vusers and Vuser scripts?
Answer.
5.1. Vuser.
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.
5.2. Vuser Scripts.
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.

Question-6. Outline LoadRunner testing process to run a performance scenario?
Answer.
You can easily create and run the load test scenario. Following steps are involved in the process.
6.1. Test planning.
A thorough test plan is required for successful load testing.
6.2. Prepare Vuser Script.
Script contain task 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.
6.4. Run the Scenario.
Emulate load on the server by introducing multiple Vusers to perform the task.
6.5. Monitor performance.
Using LR online run-time, transaction resources, database resources and firewall resources can be monitored.
6.6. Analyze results.
It produces graphs and reports. You can use them to analyze the performance of an application.

Question-7. Which LoadRunner Component is responsible for recording the performance test scenario?
Answer.
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.

Question-8. Define rendezvous point with an example?
Answer.
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.

Question-9. What is the size of VUsers required for load testing?
Answer.
The size of VUsers for load testing depends on the following parameters.
9.1. System under test (SUT),
9.2. Network configurations,
9.3. Hardware settings,
9.4. Available memory, and
9.5. Operating system.
Hence there cannot be any generic value for Vuser.

Question-10. What is the advantage of running Vuser as a process than a thread?
Answer.
When Vuser is run as a process, the copy of 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, single instance of driver program facilitates multiple Vusers. You can run more no. of Vusers on a single generator in the multi-threaded mode.

Question-11. What constitutes a performance test scenario?
Answer.
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-
11.1. The no. of users.
11.2. Action to be performed.
11.3. Virtual machines system.

Question-12. Define throughput and how does it related to response time?
Answer.
Throughput refers to the amount 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.

Question-13. What is the purpose of an extended log?
Answer.
An extended log is expected to convey the following information.
13.1. Data returned by the server and any of the advanced traces if available.
13.2. Parameter substitution.
13.3. Other information depending on the options you select in LoadRunner settings.

Question-14. What are the different types of vUser logs and state the differences?
Answer.
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 user needs debug information about parameter substitution.

Question-15. What is the need of Checkpoints in LoadRunner?
Answer.
While running a test, sometimes we need to check if desired content is found on the result page. A content check confirms that expected information appears on the Web page.
Two types of content checks are available in LoadRunner.
15.1. Text Check.
Confirm that a text string appears on a web page.
15.2. Image Checks.
Verify an image renders on a web page.

Question-16. How do you define think time in LoadRunner?
Answer.
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 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.

Question-17. What are the types of Goals in Goal-Oriented Scenario of Load Runner?
Answer.
Load Runner comes with five different types of goals.
17.1. The no. of concurrent Vusers.
17.2. The no. of hits per second.
17.3. The no. of transactions per second.
17.4. The no. of pages per minute.
17.5. Transaction response time.

Question-18. What is the significance of Correlation? Also, highlight automatic correlation.
Answer.
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 correlate the value on approval.

Question-19. What is Manual Correlation?
Answer.
Manual Correlation involves the following actions.
19.1. Identify the dynamic value.
19.2. Find the first occurrence of dynamic value.
19.3. Identify the unique boundaries to capture the dynamic value.
19.4. Write the correlation function “web_reg_save_param” before the request gets the first occurrence of dynamic value in response.
19.5. This correlation technique 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.

Question-20. How do you identify the performance bottlenecks?
Answer.
Performance Bottlenecks can be detected by using monitors.
20.1. These monitors might be application server monitors, web server monitors, database server monitors and network monitors.
20.2. They help in finding out the troubled area in our scenario which causes increased response time.
20.3. The measurements made are usually performance response time, throughput, hits/sec, network delay graphs etc.

Question-21. How to identify what to correlate and what to parameterize?
Answer.
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.

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

Question-23. What is the difference between transaction and transaction instance in LoadRunner?
Answer.
A transaction is used to measure the time between executions of certain statements. While a transaction instance is used for performance analysis.

Question-24. 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?
Answer.
NO. It’s not possible to correlate when the script is running. But you can make changes once the script has stopped.

Question-25. How do you determine the number of load generator machine required to run a test?
Answer.
The size of load generator required would totally depend on the two points.
25.1. Protocol used to create the script, and
25.2. The configuration of the load generator machine.
Each protocol has different memory print and this decides how many virtual users can be generated from the given configuration of the machine.


What is Performance Testing?
Performance Testing on a software application is done  to determine how speed, stability and scalability the application is. Speed refers to how fast the software application will respond, and stability refers to how the application handles varying workloads. Scalability is the total amount of workload the software application can handle.
What is Load Testing?
It is done to understand how varying expected loads would make the system behave. For instance, its behavior if they were many users concurrently using the same application to carry out critical transactions for a certain period of time. It is able to give the application's response time for all the important transactions in a business. Load testing can be done for a business's database and servers which will be very helpful in identifying any existent bottlenecks.
What is Stress Testing?
This is done to determine whether the software application can still perform well even in cases of extreme load. It helps the application administrators know to what extent the application can be stretched without creating bottlenecks.
What is Soak Testing?
Soak testing monitors the system's performance over time. It is also referred to as endurance testing. It aims at determining the system's capability to sustain the normal load over time. The test involves looking out for potential leaks by monitoring memory utilization, as well as performance degradation. Performance degradation refers to the system's response time over a prolonged period of sustained use. Does it remain constant, improve or decline? Results of this test are derived from application of a significant amount of load to the system for a particular period of time.
What is Spike Testing?
This test involves a sudden increase in the amount of load, for instance a sudden increase in the number of users making transactions using the application. It is meant to determine whether the system will crash, slow down or whether it will be able to handle the surge.
What is Isolation Testing?
This is usually a repeat of the test execution that had caused a problem in the system. It is done to confirm the domain in which the fault had occurred.
What is Volume Testing?
It is a non-functional test. A certain amount of data is used to test the software application. The data can be a database or an interface file like .dat or. xml. To volume test the database, expand it to the desired size and then test the application for it. If you need the application to interact with a specific interface file, get a sample of the size you desire and then run the application.
What is Failover Testing?
Failover testing is done in order to determine if a server fails during the heavy load: Is load balancer able to react quickly and is able to drive the traffic to another web server/application server. Is the other web server/application server able to handle the unexpected load. This test helps to determine how the server behaves during these type of scenarios.
Explain the performance test life cycle that you follow?
  • Gathering the requirements from client
  • Understanding the architecture/environment of the application
  • Planning and Designing the tests
  • Preparing and enhancing the scripts
  • Executing the tests in controller
  • Analyzing the results
  • Fine tuning the application
  • Retesting the application after fine tuning the application and repeat this process until we meet the SLA (Not 100% up to 90% at least).
What are all the requirements you gather from your client for performance testing?
  • The architecture of the application and the technologies used to develop the application?
  • What is a web server, application server and database server?
  • What are the browsers and Java versions supported by the application?
  • What are the different load balance techniques used?
  • What are the protocols used between client and server? Ex: HTTP, HTTPS, FTP etc.
  • What are the Business scenarios we need to test?
  • What are the preferred tools for performance testing and monitoring? Ex: Loadrunner, Jmeter, Sitescope and Wily Introscope.
  • What is the workload model and identifying the workload model?
  • SLA of the application in terms of response times and hardware resource utilization.
Have you prepared Test Plan/Test Strategy?

Yes.

What are the contents in your Test Plan/Test Strategy?
It's always better to go through the test plan before the interview, it helps a lot. Some of the Test Strategy contents are Introduction, Purpose of The Document, Scope Of The Document, Application Architecture And Topology, Performance Testing Requirements And Dependencies, Objectives And Goals Of Performance Testing, Scope Of Performance Testing, In Scope, Out Of Scope, Application Performance Scenarios, Workload Characteristics, Application Test Environment, Performance Test Tools, Performance Test Dependencies, Hardware Dependency, Software Dependency etc.
What is little’s law?

please go through this link for little's law 
http://en.wikipedia.org/wiki/Little's_law
Tell me some of the performance testing tools that you use in your company?

Loadrunner, Jmeter, Sitescope, HP Diagnostics, Wily Introscope, Dynatrace and Java Profiler.

What is performance tuning?
Performance tuning is done during the process of performance testing. Issues will be identified during the different types of performance testing. Performance tuning will be done based on the issues. It might be a software / hardware tuning. Usually Bottlenecks are identified in application and database servers. Proper tuning of the servers, code and SQL queries resolves the issue. Sometimes changes in the hardware resources will also help. 
What is the difference type of tests you conducted during testing?

Load Testing, Stress Testing, Failover Testing etc.



Some of the common questions that might ask on performance testing interview:

What is web server?
What is apache server?
How many sessions a apache can handle?
What is application server?
What is WebLogic server?
Tell me the architecture of WebLogic Server
What is WebSphere server?
Tell me the architecture of WebSphere Server?
What is WebSphere MQ server?
Tell me the architecture of WebSphere MQ server?
What is database server?

Tell me the architecture of Oracle database?

Loadrunner General Questions:
What is Loadrunner?

Loadrunner is a performance testing tool. It is developed by Mercury and acquired HP. It has versions Loadrunner 7 to Loadrunner 12.
What are the Loadrunner components? 

Vugen, Controller, Load Generators, Analysis, Shunra.
What are the Loadrunner versions used?

Loadrunner 9.52, Loadrunner 11.3, and Loadrunner 11.5 and Loadrunner 11.52.

Vugen and Scripting Questions:

How do you start the script?

We usually start the scripting after understanding of Business Critical Scenarios.
What are the various functions you have used while creating the scripts?

You should able to tell at least 10 loadrunner functions and different functions that you have used in different protocols. 
What is Step download timeout error? 

If the application does not respond in 120 seconds, step download timeout occurs in loadrunner. We can increase the step download timeout error in Loadrunner (Runtime Settings -> Preferences -> Options -> General -> Step Download Timeout.
What are the different type of parameters available?
Custom, Date/Time,File, Group Name, Iternation Number, Load Generator Name, Random Number, Table, Unique Number, User Defined Function and Vuser ID.
What is advanced trace?
It logs all the vuser messages and function calls.
What are the Logs available in LR?

Code Generation, Replay Log
What are the protocols you worked on?

Tell the protocols that you know and explain how good you are in that protocols.

Difference between Think Time & Pacing?
  • Think is time interval between two transactions.
  • Pacing is the time interval between two iterations.
What is Parameterization & Correlation?
  • Parameterization is giving the input through a parameter file in loadrunner.
  • Correlation capturing a required value from the server response in loadrunner. Example: SessionID.
How do you run specific part of your script for a specified number of times?

We can run the specific part of the script by using blocks in run time settings -> General -> Run Logic.
What are different recording modes available in LR?

We have mainly two recording modes HTML mode and URL mode.


What is the difference between HTML and URL mode?

You can go through this link for difference between HTML and URL mode.

What are the advanced features of URL recording mode in LR 9.5?
We have mainly two features:
  • Create concurrent groups for resources after their source HTML page.
  • Use web_custom_request only.
What is the difference between resource=0 and resource=1?
For example www.msn.com has many resources like images, JavaScript etc.
Here www.msn.com Resource is 0 as it is the main URL and the corresponding resources like image resource is 1.
What is the difference between lr_abort and lr_exit?
Lr_abort: it stops the execution of the action part and executed the vuser_end section.
Lr_exit: it exits from the particular action, script or iteration and there are different options with lr_exit;
Example:
lr_exit (LR_EXIT_VUSER, LR_FAIL);
lr_exit (LR_EXIT_ACTION_AND_CONTINUE, LR_FAIL);
What is the difference between lr_eval_string and lr_save_string?
Lr_eval_string: It extracts a value from a given parameter.
Lr_save_string: It saves c variable into loadrunner variable.
What is context less and context based?
Context less mean the request does not depend on the previous request. Context based means the request is dependent on the previous request.
What is the use of Save Count in web_reg_find?
Number of times the given text has found in a particular page.
What is Correlation and its function with attributes?

Capturing a value from the server response. The function name is web_reg_save_param. List of attributes are Step Name, ParameterName, LeftBoundary, RightBoundary, ORD, NotFound = Warning/Error, Savelen, Saveoffset.
How do you do auto correlation?

From Loadrunner 11.5 we have a beautiful option called Design Studio. The loadrunner will detect the dynamic values and we can do the correlation easily.

If source is not available, then how do you do correlation?

We have different option to do correlation, Generation Log, Replay Log.
Difference between “Save Offset” & “ Save Length” and what are test flags?

Save offset is used to ignore the number of letters and Save Length is used to save the length of the parameter.
When do you use Web_Custom_request?

The name of the function itself indicates the custom request. Web_custom_request is the last option that vugen prefer during creation of the script. It first tries to create the script using different web functions. This function is used by the vugen when it cannot interpret the requests with the other web functions. 

Dynamically the post data is changing, what do you do?

In this situation, I will use web_custom_request and use the for loop to append the dynamically changing data to web_custom_request.
What are check point available in LR?

web_find, web_reg_find, web_image_check.
Do you write any user defined functions?

Make sure you prepare well for this question.
What are the run time settings you have used in your script?

We use the run time settings based on our requirements. Iteration, Run Logic, pacing thinktime etc.
What are the challenges you have faced during script generation & execution?

Prepare well for this question, you should be able to answer the question clearly.


What is the difference between get and post request?

Get Request
Post Request
We can use up to 2048 character length.
It has no restrictions
Get request is less secure.
Post request is secure.
It can be cached
It cannot be cached.
It can be bookmarked
It can not be bookmarked.
What is the difference between web_url and web_link?
web_url:
  • It's a GET request
  • The web_url function does not require a context
  • web_url is recorded only when VuGen is in either URL–based recording or in HTML–based recording mode.
web_link:
  • web_link function is an action function that emulates a mouse click on the link that is defined by the attributes.
  • The web_link function can be executed only in the context of a previous operation.
  • web_link is recorded only when VuGen is in HTML-based recording mode.
What is the difference between web_submit_data and web_submit_form?
Web_submit_form
Web_submit_data
It is a context based submission
It is a context less submission
It is recorded only html based
It is recorded both in html and url mode.
What is the difference between web_submit_data and web_custom_request?
Web_submit_data
Web_custom_request
It is a context less submission
It is also context less submission.
We cannot write a custom request.
We can write a custom request using this function.
We can send through get or post request
We can send only post request
What is the difference between web_find and web_reg_find?
Web_find deprecated and we have only web_reg_find now.
What is the difference between lr_output_message and lr_error_message?
Lr_output_message
Lr_error_message
The lr_output_message sends message to the output window, log files (such as the Vaughan log file and the Application Management Web site and agent log file), and other test report summaries. When a script is run in VuGen, the output file is output.txt.
The lr_error_message function sends an error message to product output windows (such as the LoadRunner output window), log files (such as Vugen and the Application Management agent log file), and other test report summaries. For details regarding the output for each product, see the product's user guides.

If Run-time settings > General > Miscellaneous > Fail open transactions on lr_error_message is selected, calling lr_error_message will fail the transaction in addition to sending the message
To send a message to the output file, you must enable logging in the run-time settings, and select Always send messages. If you select Send messages only when an error occurs, there is no output from this function.
VuGen displays the message text of the lr_error_message function in the Execution log in red, using Error code 17999. Note that this function sends a message to the output even when logging is disabled in the run-time settings.

Controller and Analysis Interview Questions and Answers:

Difference between Scenario & Group, Real world Schedule & Basic Schedule?


Difference between Performance Center & Controller?
HP Loadrunner
HP Performance Center
It is a standalone application
It is a web based application.
Only single load test is executed at a time.
Here we can execute multiple load tests.
We cannot trace the requirements and defects
Here we can trace the requirements and defects
We cannot reserve time slots for machines
Here we can use timeslots to reserve the machines
Loadrunner is good if we are using from one location.
Performance Center is good if we are operating from different locations.
How do you come to know which Vuser failed?
We can check in the vuser status message.
What is Rendezvous point?
When lr_rendezvous function is called, all the users wait at that point and executes the next step.

What is IP Spoofer in loadrunner?

We can create the IP addresses dynamically using IP Spoofer.
Can you configure load generators in Windows & Unix?

Yes, we can configure the load generators in both Windows and Unix.
Can we run different scripts by using Performance Center and the Controller?

Yes, we can run.
Analysis
What are the default counters that loadrunner analysis file shows?
Vusers, Hits Per Second, Throughput, Average Transaction Response Time, Transactions per second.
What are the Operating Systems counters you monitor?

CPU, Memory, Disk, Network
Give me 5 server counters that you regularly check?
Response times, throughput, hits per second, CPU, Memory, Heap Memory.
What AWR Reports? From which version of the Oracle – AWR feature is added?
AWR stands for Automatic workload Repository. It is introduced from Oracle 10g.
What is Granularity?

Granularity is the time interval of sampling the data in loadrunner analysis.

Difference between Thread & Process?
Thread
Process
Threads are dependent on each other in a process
Process are independent of each other
Threads uses very less resources
Process uses very high resources
Threads shares the address space
Process requires a separate address space
Threads carry very less information when compared with process.
Process carry more information
What is JVM & Unix?
JVM stands for Java Virtual Machine which is a platform independent and converts Java byte code to machine language. As it is platform independent we can execute the code on any operating systems.
Unix is a multiuser operating system and has many flavors like Linux, Sun Solaris, AIX, HP Unix, Ubuntu etc.
What is Memory Leakage?
What is Garbage Collection?
What are the algorithms available in GC?
What is Heap memory?
How do you monitor server counters?

We use Sitescope or NMON tool and different commands available in Linux VMSTAT, IOSTAT, TOP etc.
What is Table Scanning?
When there are no Proper indexes given in the database tables, some queries will scan the entire data in the tables and collect the results which will increase the response time.
What are context switches?
What is a deadlock?
Deadlock occurs when two or more processes/threads waiting for the other to finish and it never happens and this leads to deadlock.  This situation will apply to hardware/software, Java and databases.
What do you suggest to your client if there is a sudden hike in the CPU utilization while execution?
Sudden hike in the CPU utilization might have many reasons. We need to analyze what caused the high CPU utilization by using different tools and profilers.
What is Parsing, Soft Parse, and Hard Parse?
Parsing: It will check the syntax, misspelled SQL keywords and authentication.
Soft Parse:  If the requested query is found in shared pool soft parsing occurs and it consumes less resources.
Hard Parse:  If the requested query is not found in shared pool hard parsing occurs and it consumes very high resources.
What is the difference between Web Server, Application Server and Database Server?
Web Server
Application Server
Database Server
Ex: Apache, IIS and Nginx
Weblogic and Websphere
Oracle, My SQL,  and SQL server
It handles HTTP requests.
It handles HTTP requests and it contains business logic.
It handles different queries, and records.
Resource utilization is low.
Resource utilization is high.
Resource utilization is high.

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.
Examples:
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.
Is there any impact if we reduce “Think Time” up to 50%?
Yes, there will be impact as the load on the server increases if we decrease think time. Mainly we have an impact on response times, throughput and system resources etc.


How to check network bandwidth is not sufficient?

Data Transfer rate between application server and database server or between client and the server is more than the bandwidth, then we can conclude the bandwidth is not sufficient.

Weblogic Top Counters for Performance Testing:

Thread Pool, DB Connection Pool, Garbage Collection, Java Heap memory, Load Balancing, Application logs, Hard Page Faults.

Oracle DBA Top Counters for Performance Testing:

In AWR Report: Shared Pool Memory, Cache Hit Ratios, Top 5 Events, Top SQL by CPU, Top SQL by I/O, Top wait events, Buffer pool cache hit ratios.


Operating System Counters are common for both Weblogic and Oracle DBA: CPU, Memory, Disk I/O, and Network.

At Last......

Every option in the Vugen, Controller and Analysis are important. The interviewer might ask any question on the tool. We should prepare for the interview in such a manner.  Please go through the following settings once before you go for the interview.
  • Run time settings
  • Recording Options
  • Controller Options

1 comment:


  1. Nice information about the load testing!!! I prefer Loadrunner automation testing tool to validate the performance of software application/system under actual load.
    Regards:
    Loadrunner Training in Chennai |
    Best qtp training institute in Chennai

    ReplyDelete