How to measure the response time for file uploading request?
How to handle dynamic page requests?
In a page there are few links say 10 .For each and every reply links positions are changing. But every time you have to hit same link? What is your approach?
In a scenario i have 100 users but i have limited data which was not reusable. Now which parameter properties i have to use to design a test?
Assume that i am a client gather what all parameters are required to test the application performance?
In a scenario throughput is constant even though the users are hitting the requests. How to analyze the throughput?
I want 10000 TPS. How you will achieve that many TPS?
In a scenario i have to execute the requests in a group. In which way i can execute particular requests in a group?
I wanna know the response time for a page with 1000 simultaneous users. What is your approach?
On which basis you will suggest infrastructure guy to generate Dynamic IP’s?
How to pass a value from one script to some other or with in the script?
How to design a scenario when the data is not reusable?
I have N number of scripts with me .while executing those i wanna target each and every script with targeted number of users? Then what is your approach to design such type of scenario?
Is it possible to give multiple ramp_up’s ?
How to drill down the client side metrics?
I am executing a test with 1000 users for 2 iterations all requests are passed . For the next iteration requests are getting failed ? Now what is your approach to make those pass?
How to run garbage collector? And when to run?
How you will come to know that there is memory leak?
During the execution you will receive 502 error or 500 error ? What you will do?
How to know that whether a file is uploaded or not?
You have to capture all the occurrences and pick a random value every time? What is your approach?
In an array there are 200 values but every iteration i have to pick same value ? What is your approach?
In the first iteration for one request response time is 2sec , in the next iteration same request took 1sec to execute? Why and how it is executed like that?
What is the impact of cache on the response times?
While executing the test with 1K you found that system memory reached to 95%. The customer asked you to execute test with 1.5K ? Is it possible to kick off the test ? Why?
For a retail application client asked that suddenly load should increase and suddenly load should decrease? How to design such type of scenario?
How to decide the ramp up ?
The users are login to the application . If user is successfully logged in then only the page is redirect to next page otherwise again user has to perform same login transaction?
While executing a test few users are frequently failing. At that i wanna kill the users who were failed ? Remaining should execute the requests? Client asked you that i wanna this many hits. What is your approach to achieve ?
One script is generating the data , the same data we have to use in some other script? What you could do?
How many ways we can validate a request?
What is performance testing? When we have to conduct?
I have 10 scripts i wanna design a scenario such a way that i wanna distribute load separately to each and every script?
I have 100 users for first iteration all should pick same data point , second iteration also should pick same like same for remaining iterations ?
How to generate random value from an array?
While executing the test i wanna capture all dynamic values and store all dynamic values in a local file ? What you will do?
What are the types of parameters?
What is your approach to capture dynamic value where the boundaries are dynamically changing?
In a scenario all the boundaries are matching . i wanna capture all values ? How to do ?
If Client asked you to calculate 90th percentile ? How you will calculate?
If the client doesn't know any thing how to gather the requirements when application is already in production?
If the client doesn't know any thing how to gather the requirements when we have competitor?
If the client doesn't know any thing how to gather the requirements when client have core business?
If the client doesn't know any thing how to gather the requirements when application is completely new(Greenfield)?
What is test plan and what it contains?
What are the parameters we need to consider while designing the workload model?
What is workload /load model / volume model ?
What is Little’s law ? How it is useful ?
What are the challenges you faced in your carrier?
What are the scripting challenges you faced so far ?
What is parameterization? And types?
What is correlation ? When we have to do correlation?
What is your approach to capture a dynamic value when the boundaries are dynamically changing?
How many ways we can validate a request?
Tell me few c functions you used so far?
Tell me few LR functions? And web function?
How to edit the script?
How to kill the user at the middle of iteration?
How to generate random value from an array?
What is the think time? What is it effect on response times?
Why we need to give think time in between requests?
What is difference between web reg save param and web reg save param ex functions?
What is the differences between web find and web reg find functions?
What is the differences between HTML and URL modes?
What is the differences between socket level and win_inet level data?
Which is better way to run the user as a thread or process? Why?
How to design a manual / goal-oriented scenario?
What is IP spoofing?
What is rendezvous point?
How to design spike test?
How many types of tests you executed so far? What are those?
If the controller got crashed at the middle of execution what is your approach?
How to distribute the load using LG?
How to justify how many users we can assign to particular LG?
How to debug the error?
How to add the users when designing the scenario?
What are common errors you have seen in your carrier?
What are options in run time settings?
What is pacing?
What is global think time?
How to enable text and image verification in RTS?
If i keep the think time inside of the transactions? What is the effect ? And how to solve that issue without executing one more test?
What you will do when the response time is not meeting as required?
How to analyze client side statistics?
How to analyze side side statistics?
How to analyze application side statistics?
How to generate and apply templet?
How many types of report formats we can generate in analyzer?
Which tools you are using for bug tracking and reporting?
You have experience like generating data base reports like AWR report?
Which server you are using in current project and it’s configuration?
What is the difference between performance center and controller ?
How to insert the script into PC?
How to do the modifications in Body section in webservice script without opening the vugen script ?
Fiddler
When we have to use fiddler?
Present which version you are using? And extension of fiddler file?
How to build vugen script using fiddler request?
PerfMon
why we have to use perfmon?
How to add the counters in perfmon? And how to export data?
Whether we can access the remote machine using this tool for monitoring?
Nmon Report
How to generate Nmon report?
Jvisual VM
How to access to remote machine? And port number of remote machine?
Which metrics we can monitor using this JVM?
How to generate thread dump and memory dump?
What is garbage collector ? How many types of algorithms you know?
Dynatrace /App Dynamics
how to drill down for the error?
Why we have to use API tool?
=================================================
Load Runner interview Questions & Answers-1
Why is Performance testing beneficial to applications longevity?
- To experience how the systems respond to incoming traffic
- To optimize the system infrastructure
- To baseline and benchmark for future releases
- To make an informed go-live
How does vugen work to capture HTTP traffic?
A : VuGen captures the HTTP traffic when we perform actions on an application and converts the same into a script
Q1. What Is Load runner?
Answer : Load Runner accurately measure and analysis the system performance and its functionality.
Q4. What Is Load runner Controller?
Answer : Controller is manage and maintain the scenario. using controller you control all the vuser in single work station .
Q5. What Are The Load runner Testing Process?
Answer :
There are 5 steps.
1-planning the test.
2-creating the vuser script.
3-creating the scenario.
4- running the scenario.
5-analysis the test result.
Q6. What Is Load runner Agent?
Answer : Agent is interface between host machine and controller.
Q7. How You Load A Load runner Agent?
Answer : Controller instruct the remote command luncher to lunch the Agent .
Q8. What Is Load runner Api Function?
Answer : Data base vuser do not operate client application. Using Load Runner API function the database vuser can access the data from the server.
Q9. What Is The Load runner Start & End -transaction And Its Syntax?
Answer : It will start the transaction on the script. Syntax. Lr-start-transaction("transaction name").
It will end the transaction. Syntax. Lr-end-transaction("transaction name", LR-AUTO).
Q13. How Many Users Can I Emulate With Load runner On A Pc?
Answer :Unlimited, No dead end., Depends on system response. That too inturn depends on various factors like entire system configuration etc. If system bottle necks observes in very beginning or minimum no of Vusers no further addition of vusers will be considered unless observed bottleneck is resolved.
Q14. What Are The Vuser Components In Load runner?
Answer : Application Components used are client, database or additionally business application server.
Web Server works on and through LAN,WAN,or www connection.
Application Server components are client, business server and database server without use of www. but through Protocols like FTP.
Q15. Load runner Function - How To Get Current System Time
Answer :This function can be used to report transaction times , script start time and end time.
long get_secs_since_midnight(void)
{
char * curr_hr; /* pointer to a parameter with current clock hr *
char * curr_min; /* pointer to a parameter with current clock min*/
char * curr_sec; /* pointer to a parameter with current clock sec */
long current_time, /* current number of seconds since midnight */
hr_secs, /* current hour converted to secs */
min_secs, /* current minutes converted to secs */
secs_secs; /* current number of s curr_hr = lr_eval_string("{current_hr}>");
curr_min = lr_eval_string("{current_min}");
curr_sec = lr_eval_string("{current_sec}");
hr_secs = (atoi(curr_hr)) * 60 * 60;
min_secs = (atoi(curr_min)) * 60;
secs_secs = atoi(curr_sec);
current_time = hr_secs + min_secs + secs_secs;
return(current_time);
}
Q16. What Are The Reasons Why Parameterization Is Necessary When Load Testing The Web Server And The Database Server?
Answer : Parameterization is generally done to test with multiple set of data or records.
Q17. What Is Scenario?
Answer : A scenario defines the events that occur during is testing session. Eg (deposit cash, withdraw money…).
Q18. What Is The Vuser In The Scenario?
Answer : Load Runner replace the human user with vuser.
Q19. What Is Vuser Script?
Answer : While run a scenario every vuser execute a script that script known as vuser script .
Q20. What The Vuser Script Contain?
Answer : The vuser script includes the function that measure and record the performance of the server during the scenario.
Q21. What Is Transaction?
Answer : Transaction measure the time, which takes for the server to respond to task submitted by the vuser.
Q22. What Is Rendezvous Point? When The Rendezvous Point Is Insert?
Answer : To emulate peak load on the server.
When multiple vuser to perform tasks at exactly the same time then insert the rendezvous point to emulate the peak load on the server.
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.
Q313. I wanna know the response time for a page with 1000 simultaneous users. What is your approach?
Answer: Insert the rendezvous point in the script on the above the targeted request and enable rendezvous point in the controller with targeted no. of uses. After that if we executed the test . The test result will give the response time .
Q24. What Is Host?
Answer : Host is machine which execute the vuser script.
Q25. What Is Planning For The Test.
Answer : Define the performance testing requirements for example no. of concurrent users, typical business processes and required response time.
Q26. What Do You Mean By Creating Vuser Script?
Answer : Creating vuser script for emulate the action that virtual user Perform during the scenario execution.
Q27. What Are The Process For Developing A Vuser Script.
Answer :
There are 5 steps for developing a vuser script.
- Recording the vuser script .
- Edit the vuser script.
- Runtime setting .
- Run the vuser script in stand-alone mode.
- Incorporate the vuser script into a Load Runner scenario.
Q28. How To Create A Scenario?
Answer : We have to install Load Runner controller to the host . Then we include list of host(where vuser script execute) then list of vuser script (where vuser run) and then list of vuser that run during the scenario.
Q29. What Do You Mean By Remote Agent Dispatcher(RAD)?
Answer :RAD enables the controller to start the application on the Host machine .
Q30. How Many Types Of Vuser Are Available?
Answer : There are several type of vuser(GUI ,Database ,RTE(terminal emulator), SAP, DCOME, People soft, java, Baan)
Q31. What Is Gui Vuser And On Which Platform It Will Run?
Answer :GUI vuser operate graphical user interface application and it can run in either the MS-Windows / X-Windows environment .
Q34. How You Develop The Database Vuser Script?
Answer :Developing the database vuser script either by recording with Load Runner vuser script generator (VuGen) or by using Load Runner vuser script template.
Q35. How Many Section Database Vuser Script Have?
Answer :3 section ,written in code that assemble in C, SQL call to the database, written in TSL(test script language).
Q37. What Is Run-time-setting?
Answer :Run-time-setting include loop,log and timing information.
Q38. What Is Stand-alone Mode?
Answer :To verify that the script runs correctly.
Q39. What Type Of Function Generate And Insert By The Vugen To The Script When You Record A Script?
Answer :
- LR Function.(vuser function)
- protocol function.
Q40. What Is Lr-function?
Answer :obtain the information about vuser running in a scenario .
Q41. What Is Protocol Function?
Answer :Obtain the information about the type of vuser.
Q42. What Are The Section Contain By The Vugen While Creating A Vuser Script?
Answer : Vugen contain the 3 section .
- vuser-init : Record a log in to the server(vuser initialize loaded)
- action. : Record the client activity
- vuser-end.: Record a log off in to the server (vuser stoped).
Q46. How Vugen Create A Vuser Script?
Answer : By recording the activity between client and server.
Q49. What Are The Element In The Load Runner Controller?
Answer :Title bar(name of the scenario presently working). Menu bar(selecting the various command). Tool bar. Status bar.
Q50. What Are The 5 Icons Appear In The Bottom Of The Controller Windows?
Answer :
1-host windows(list of machine).
2-script windows(list of all the vuser script)
3-rendezvous windows.
4-transaction windows(display all the transaction) .
5-output window( display error and notification message).
Q51. What Is .lrs?
Answer : Load Runner save the information in a scenario files.
Q52. What Is Scenario Wizard?
Answer : Through scenario wizard we can create a new scenario.
Q53. What Is Filtering And Sorting?
Answer : We can filter the information display only those items that meet the selected criteria(filter box) .exam you can filter vuser only those who are in ready state. Sorting - we can sort all the vuser in the vuser list. In order to their vuser ID(1,2,3,4,5,6,7,8,9).
Q54. What Are The Information Crating For Each Host?
Answer :
1-the status of the host.
2-the platform type of the host(windows/Unix).
3-details of the scenario.
Q55. How To Create A Host List For A Scenario?
Answer :
1-install remote command luncher on every machine.
2-add the name of the host to the host lists.
3-set attributes for each host.
4-select which hosts will take part in the scenario.
Q56. What The Host Attributes Determine?
Answer :
1-the maximum number of vuser that host can run.
2-the initialization quota .
3-the location of the Win-runner configuration file.
4. the location of the file during run-time.
Q57. How You Set Maximum Number Of Vuser That A Host Can Run?
Answer :
We can modify the maximum number of vuser according to the (available resource , the needs of your scenario, Load Runner license agreements).
Q58. What Do You Mean By Initialization Of Quota?
Answer :
Capabilities of the host that at a time how many vuser Are initialize .
Q59. What Is Scenario Default?
Answer :
Instruct the vuser to use the Win-runner configuration file.
Q60. What Is Local Configuration File?
Answer :
Instruct the vuser to use hosts Win-runner configuration file.
Q61. What Do You Mean By Path?
Answer : Use Win-runner configuration file that is in a specific location on the network.
Q62. During Run Time Where The Hosts Saves The Files?
Answer : In temporally in the local drive of each host.
Q63. What Is Script List?
Answer : It contain all the vuser script that vuser can run.
Q64. What Are The Information Contain By Script Windows For Each Script In The List?
Answer :
1-name of the vuser script .
2-the type of the vuser.
3-the location(path).
4-command line option.
Q65. How To Modify The Script?
Answer : Using vuser script information dialog box.
Q66. What Is The Purpose Of Running The Scenario?
Answer : To check the response time of the client/server system under load.
Q68. When A Scenario Run Exactly What Happened?
Answer : 1-The controller check the scenario configuration information.
2-then next it invoke the application that you select to run with the scenario .
3- then transform each script to its related hosts, when the vuser are ready they start execution.
Q69. How To Run A Scenario?
Answer :
Open an existing scenario .
Configure the scenario.
Set the result directory.
Run the scenario.
Q70. When You Initialize The Vuser What Happen?
Answer : The vuser status change from DOWN to PENDING to INITIALIZING to READY. If vuser fails to initialize , the vuser status changes to ERROR.
Q71. What Is Pause Command?
Answer : It changes the status of the vuser from RUNNING TO PAUSE.
Q72. What Is Running Virtual User Graph?
Answer : It displays the number of the vuser that execute vuser script during each second of the scenario run. Only running and rendez state are include.(loading, ready and pause are not displayed).
Q73. What Is Report Viewer?
Answer : Each report viewer contain the report header and report viewer tool bar.
Q74. What Is Report Header And What Are The Information Contains?
Answer : It display general scenario information and it contain the information like (title, scenario, result start time, end time and duration).
Q76. What Is Transaction Per Second Graph(pass)?
Answer : It display the number of completed , successful transaction perform during each second of scenario run.
Q77. What Is Percentile Graph?
Answer : The percentage of transaction that were performed within a given time range.
Q78. What Is Transaction Performance Graph?
Answer : Display the average time taken to perform transaction during each second of the scenario run.
Q80. What Is Load Testing?
Answer : Load testing is to test that if the application works fine with the loads that result from large number of simultaneous users, transactions and to determine weather it can handle peak usage periods.
Q81. What is performance testing and why is it important?
Performance testing is important because it helps ensure that software performs well under load. It can identify bottlenecks and identify areas where improvements can be made.
Example: “Performance testing is a type of software testing that is conducted in order to determine how a system or application performs in terms of responsiveness and stability under a given workload. In other words, performance testing is conducted to assess the performance of a system or application under normal and peak load conditions.
Performance testing is important because it helps ensure that a system or application can handle the required amount of traffic or load without any issues. Additionally, performance testing can also help identify potential bottlenecks in a system or application so that they can be addressed before the system or application goes live.”
Q82. Did U Use Load Runner? What Version?
Answer : Yes. Version 12.62
Q83. Explain The Load Testing Process?
Answer :
Step 1: Planning the test. Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load-testing objectives.
Step 2: Creating Vusers. Here, we create Vuser scripts that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.
Step 3: Creating the scenario. A scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create scenarios using Load Runner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. Load Runner automatically builds a scenario for us.
Step 4: Running the scenario. We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.
Step 5: Monitoring the scenario. We monitor scenario execution using the Load Runner on-line runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors.
Step 6: Analyzing test results. During scenario execution, Load Runner records the performance of the application under different loads. We use Load Runner’s graphs and reports to analyze the application’s performance.
Q84. When Do You Do Load And Performance Testing?
Answer : We perform load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Whereas single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For example, a typical application-testing scenario might depict 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc. This is when we set do load and performance testing.
Q85. What Are The Components Of Load Runner?
Answer : The components of Load Runner are the Virtual User Generator, Controller, and the Agent process, Load Runner Analysis and Monitoring.
Q89. What Is A Scenario?
Answer : A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.
Q142. How Will You Define The Complexity Of A Performance Scenario?
Answer : Usually by looking at the number of transactions & the no of correlations.
Q143. What Is Correlation?
Answer : Correlation is a technique to handle the dynamic values generated by the server like session id's or serialization id's by replacing them with the current values generated during the run-time.
Q79. What Are All The Types Of Correlation?
Answer :
Manual & Automatic Co-relation
Manual correlation - Correlation is used to obtain data which are unique for each run of the script and which are generated by 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.
Q92. What Is Correlation? Explain The Difference Between Automatic Correlation And Manual Correlation?
Answer : 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.
Q93. How Do You Find Out Where Correlation Is Required? Give Few Examples From Your Projects?
Answer : Two ways: First we can scan for correlations, and see the list of values which can be correlated. From this we can pick a value to be correlated. Secondly, we can record two scripts and compare them. We can look up the difference file to see for the values which needed to be correlated. In my project, there was a unique id developed for each customer, it was nothing but Insurance Number, it was generated automatically and it was sequential and this value was unique. I had to correlate this value, in order to avoid errors while running my script. I did using scan for correlation.
Q94. Where Do You Set Automatic Correlation Options?
Answer : Automatic correlation from web point of view can be set in recording options and correlation tab. Here we can enable correlation for the entire script and choose either issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.
Q252. 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?
Answer: Correlation rules can be exported through the “.cor“ file and the same file can be imported through VuGen.
Q95. What Is A Function To Capture Dynamic Values In The Web Vuser Script?
Answer : Web_reg_save_param function saves dynamic data information to a parameter.
Q273. If the LB or RB is keep on changing. What is your approach to capture the dynamic value?
Answer:
Sol-1: If the dynamic LB is static use “Save offset” argument.
Sol-2: Use Flag system.
Flag System:
Any dynamic number is a part of LB we can use Flag System.
Ex-1: H1I tvs Welcome.
H2I suzuki Welcome.
Sol: web_reg_save_param(“parametername”,”LB/DIG=H#I”,”RB=Welcome”,LAST);
Q274. What is your approach if LB or RB isn’t present for a dynamic value?
Answer:
If the LB isn’t available take any static text from the above line pass it as a LB & identify
exact LB from the capture value & pass it as LB.
If the RB isn’t present in the dynamic value take any static text from the below line & pass it as a RB & identify exact RB from the capture value & pass it as a RB.
Q274. Why correlation function is keep on failing?
Answer:
1. Invalid LB or RB.
2. Function location might be wrong.
3. May be your trying to capture more than 256 characters.
4. May be the dynamic value itself not available the response.
Q265. How will you handle the situation in scripting where for your mailbox you have to select any one mail randomly to read?
Answer: 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.
Q266. How is Automated Correlation configured?
Answer: Any setting related to Automated Correlation can be done by General Options->Correlation. Correlation rules are set from Recording options->Correlations.
Q388. How to generate random value from an array?
Answer: Using correlation function web_reg_save_param capture the dynamic values and all the values were stored in an array.
Using lr_paramarr_random () function we can generate a random number from that array.
Syntax:
int x;
web_reg_save_param(“cRandom”,”lb=”,”rb=”,”ord=all”,LAST);
x=lr_paramarr_random(lr_eval_string(“{cRandom}”));
Q389. In a scenario all the boundaries are matching . i wanna capture all values ? How to do ?
Answer:
Using ordinal argument we can capture all values whose boundaries are matching/same.
Q330.What is the use of save-offset argument ?
Answer: Using save-offset we can ignore few number of characters from the dynamic value.
Q331.In a scenario there is a drop down in that drop down for each and every reply the position of the elements in the drop down are changing. But Every time I wanna capture same element/value. What is your approach to achieve this?
Answer: To achieve this we have to use real frame ID .
[ Write Web_reg_save_param correlation function with the arguments Param name , LB , RB, real frame ID .]
Q : Working for a banking application I want to capture the customer account balance and I have to add 100 rupees to his/her account ? How you will do this?
Answer:
Int y=100;
step 1:using the correlation function capture the account holder balance .
web_reg_save_param(“balance”,”lb=”,”rb=”,LAST);
Step 2: the captured balance is a string and the amount going to add to the account is integer. So convert the sting to integer using a to I function .
Int x;
x=atoi(lr_eval_string(“{balance}”));
Step 3: Now converted amount will be the integer and the adding amount is also integer . So we can add those directly.
z=x+y;
Q96. When Do You Disable Log In VUGen, When Do You Choose Standard And Extended Logs?
Answer : Once we debug our script and verify that it is functional, we can enable logging for errors only. When we add a script to a scenario, logging is automatically disabled. Standard Log Option: When you select Standard log, it creates a standard log of functions and messages sent during script execution to use for debugging. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled Extended Log Option: Select extended log to create an extended log, including warnings and other messages. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled. We can specify which additional information should be added to the extended log using the extended log options.
Q97. How Do You Debug A Load Runner Script?
Answer : 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.
Q98. How Do You Write User Defined Functions In Lr? Give Me Few Functions You Wrote In Your Previous Project?
Answer : Before we create the User Defined functions we need to create the external library (DLL) with the function. We add this library to VuGen bin directory. Once the library is added then we assign user defined function as a parameter. The function should have the following format: __declspec (dllexport) char* <function name> (char*, char*) Examples of user defined functions are as follows: GetVersion, GetCurrentTime, GetPltform are some of the user defined functions used in my earlier project.
Q99. What Are The Changes You Can Make In Run-time Settings?
Answer : The Run Time Settings that we make are:
- General :-
- Browser :-
- Network :-
- Internet Protocol :-
- Data Format Extension :-
Q100. Where Do You Set Iteration For Vuser Testing?
Answer : Run time settings -> Pacing -> set number of iterations.
Q101. How Do You Perform Functional Testing Under Load?
Answer : Functionality under load can be tested by running several Vusers concurrently. By increasing the amount of Vusers, we can determine how much load the server can sustain.
Q105. What Is The Relation Between response time And Throughput?
Answer : 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.
Q106. Explain The Configuration Of Your Systems?
Answer :The configuration of our systems refers to that of the client machines on which we run the Vusers. The configuration of any 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 that would include the network infrastructure, the web server, the database server, and any other components that go with this larger system so as to achieve the load testing objectives.
Q108. If Web Server, Database And Network Are All Fine Where Could Be The Problem?
Answer : The problem could be in the system itself or in the application server or in the code written for the application.
Q109. How Did You Find Web Server Related Issues?
Answer : 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/sec that occurred during scenario, the number of http responses/second, the number of downloaded pages/second.
Q110. How Did You Find Database Related Issues?
Answer : By running “Database” monitor and help of “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 than you can see database related issues.
Q122. Is It Possible To Record With Ajax (click & Script) & Web (click & Script) In Multiple Protocol Scenarios?
Answer : No.
Q123. Which Protocol You Would Recommend For Testing Performance For .net Applications Implemented With Ajax And Why?
Answer : Ajax (click & script) OR web (click & script) OR MS.Net protocols.
Q124. Imagine You Are Running A Load Test And After Some Time Controller Generated The Error. What Will Be Your Reaction And What You Will Observe?
Answer : I will look into the Log message window in controller and identify why the error is thrown & if needed I will make enhancement to my Vuser script in Vugen and then run the script in debug mode to make that the Vuser script does not fail and will refresh the script in controller and the start the scenario back.
Q127. What Type Of Monitors Have You Setup?
Answer : I worked with various monitors at App server level and monitors of windows resources of the servers and few monitors at db level.
App server monitors –JVM size, Connection ppol, GC, Heap size, free memory etc.;
Windows resources –CPU utilization, processing time, Process, Virtual memory, page faults etc.:
Db monitors –Top time consuming sql's, poor indexes, dead locks, etc...
Q128. What Type Of Servers Have You Worked On?
Answer : Worked on App servers like Weblogic, Jboss, MS-IIS 6.0 and db servers like DB2 and sql server.
Q129. For A Typical Pt Project, What Type Of Documents Do You Expect For A Client ?
Answer : Documents related to the High level and low level architecture of the application. Design documents and documents that describe the usage of third party components and external communication components and documents that describe the communication architecture of the application and use cases and test cases of the business critical scenarios and documents related to the system service levels and documents of h/w , s/w re's etc......
Q131. What Is The Response Time For The Application That You Have Tested In Your Recent Project?
Answer : It varies from business scenario to business scenario, the response time for critical business scenario is 3 sec's.
Q132. What Are The Recommendations That You Have Provided For The Client?
Answer : Poor GC, constant high usage of VM, connection pools, poor indexing and complex sql queries etc.
Q133. What Are The Challenges You Have Faced Till Now In Pt?
Answer : To simulate the load on EJB applications that uses RMI protocols over IIOP.
Q134. What Is The Difference Between Load Testing And Endurance Testing?
Answer : Load Testing – Test objective is to find the application behavior is terms of response time under anticipated load.
Endurance – Test Objective is to simulate load on an application up-to a period of time to monitor the application performance for longer periods..
Q137. What Type Of Settings Have You Done For Web (click & Script) Protocol?
Answer : Change the Event configuration Level, Select appropriate mode(GUI/URL/HTML) etc..
Q138. Suppose While Recording In Web (http) Protocol, You Could Not Correlate Dynamic Values. What Will Do?
Answer : Will look into the Response Log of the function while recorded.
Q140. What Are The Differences Between URL Mode And HTML Mode And In What Context You Choose One Over Another While Selecting Protocol For Recording?
Answer : The HTML-based script level generates a separate step for each HTML user action. The steps are also intuitive, but they do not reflect true emulation of the JavaScript code.
The URL-based script mode option instructs VuGen to record all browser requests and resources from the server that were sent due to the user's actions. It automatically records every HTTP resource as URL steps (web_url statements). For normal browser recordings, it is not recommended to use the URL-based mode since is more prone to correlation related issues. If, however, you are recording pages such as applets and non-browser applications, this mode is ideal.
Q290. In which scenario you are going to use URL mode?
Answer:
Scenario 1: My application is a non browser specific application. So we use URL mode to make ensure that all resources should be downloaded.
Scenario 2: My application downloading lot of java files for every page. So we use URL mode to make ensure that every java script file has to be downloaded
Q144. What Is Sprintf() ?
Answer : Writes formatted output to a string
Q145. What Is The Difference Between Recording Log, Generation Log, Replay Log ?
Answer : Recording Log: A Network Analyzer would analyze the communication happing at network level and logs the events.
Generation Log: Logs the events happening while generating the Vuser script after recording.
Replay Log: Records the events of happening when executed a function in the script. Will be logged at each line level of the script.
Q146. As You Employ The Settings Of Logging(standard, Extended) For A Script In Run- Time Settings, How Do You Do This Using Code?
Answer :
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG, LR_SWITCH_ON)
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG,LR_SWITCH_OFF)
Q150. What Is IP Spoofing? Why Do We Use It ?
Answer : When testing using Web and Win-socket protocols, by default Vusers on each host machine use the host's (agent's) IP address. Since a particular server keeps serving a specific IP address, load tests would reflect network router caching and other optimizations rather than the real-life situation where different users arrive to the server with different IP addresses. This is especially needed when the hardware configuration under test balances load across a "farm" of several (web or database) servers. "IP spoofing" enables each host machine to "spoof" the server into thinking it is using many different IP addresses.
Q151. What Functions Would Be Generated When Selected Ajax Protocol ?
Answer : Web_Submit_Data();
Q152. How Many Types Of Checkpoints Are Available In Load Runner?
Answer : Load Runner provides two types of checkpoints:
1. Text Checkpoints
2. Image Checkpoints
Q153. What Is The Host?
Answer : Host is machine which executes the Vuser script.
Q154. What Is The Log?
Answer : Log is level of information which we want to gather during run time.
Q158. What Is The Lr Function?
Answer : LR function is obtained the information about the running Vuser.
Q163. What Is The Pause Command?
Answer : It will change the status of running vuser to pause.
Q125. What Is The Process Followed While Scripting In Vugen?
Answer : Identify the protocol (protocol Advisor) → create a new Vuser script by selecting the supporting protocol → Record the actions with appropriate recording options → Generate Script → Run the script → Identify the dynamic values and correlate all the dynamic values and run the script
Q164. What Are Process For Developing A Vuser Script?
Answer : There are five steps for developing a Vuser Script:
Record Vuser script
Edit Vuser script
Change Run Time Setting
Run Vuser script in standalone machine
Incorporate the Vuser script into Load Runner scenario
Q254. How is VuGen script modified after recording?
Answer::- Once the script is recorded, it can be modified with the following process:
- Transaction
- Parameterization
- Correlation
- Variable declarations
- Rendezvous Point
- Validations/Checkpoint
Q165. What Is The Protocol Function?
Answer : Protocol function obtained the information about the type of Vuser.
Q166. What Is The Controller?
Answer : It organizes, drive, manage, and monitor the load test.
Q167. What Is The Scenario Wizard?
Answer : We can create new scenario through Scenario Wizard.
Q168. Which Component You Are Using For Recording The Vuser Script?
Answer : We are using Vugen component for recording the Vuser script.
Q169. What Is The Manual Scenario?
Answer : Manual Scenario manages the load test by specifying the number of vuser to run.
Q171. What Is The Load Runner Agent?
Answer : Agent is interface between controller and host machine.
Q172. What Is The Vuser?
Answer : In Scenario, Load Runner replaces human user with Virtual User or Vuser. Vuser emulates the human action working with your application.
Q173. What Is The Vuser Script?
Answer : The action that Vuser performances during the scenario are described in the Vuser script.
Q174. What Is The Run Logic?
Answer : In Run Logic we can set the number of repetitions which are performing by Vuser.
Q175. What Is The Html Based Script?
Answer : HTML based script generates separated steps for each user actions.
Q176. How To Load Load Runner Agent?
Answer : Controller instructs the RCl to lunch the Load Runner Agent.
Q177. What Type Of Functions Are Generated And Inserted By Load Runner?
Answer :
Load Runner generated two types of functions:
LR Function
Protocol Function
Q178. What Is The Transaction?
Answer : To measures the performance of the server, we define the Transaction.
Q179. What Is The Load Testing Process?
Answer :
Load Testing process have five steps:
Plan Test
Create Vuser script
Define Scenario
Run Scenario
Analyze Results
Q180. What Is The Load Runner Components?
Answer :
Load Runner have the five components:
Vuser Generator
Controller
Load Generator
Luncher
Analysis
Q183. What Is The Script View?
Answer : Its text based view.
Q185. What Is The Running Vuser Graph?
Answer : It displays the number of Vusers that execute the Vuser script each seconds of scenario run.
Q187. What Is The Tree View?
Answer : Tree view is icon based view.
Q191. What Is The Luncher?
Answer : It provides single point of access for all load runner components.
Q193. What Is The Action Section?
Answer :In Action section, Load Runner records end user activities.
Q194. What Is The Url Based Script?
Answer :It records all requests and resources from server.
Q195. What Is Extension Of Load Runner Result File?
Answer : .lrr
Q196. What Does Result Window Contain?
Answer :
Result Window open with two panes:
Tree Pane
Summary Pane
Q198. How Many Types Of Vuser Are Available In Load Runner?
Answer : There are many types of Vuser like DB Vuser, SAP Vuser, Web Vuser, RTE, GUI Vuser.
Q199. How Can We View The Script?
Answer : We can view the script through Tree View and Script View.
Q201. What Is The Parameterization?
Answer : Parameterization is script variables which are used to pass many values to server. It emulates the actions of human user.
Q202. What Is The Load Runner End-transaction And Its Syntax?
Answer : It end the Transaction on the script and its syntax is that lr-end-transaction.
Q181. How Many Types Of Scenario In Load Runner?
Answer : Load Runner provides two types of scenario:
1. Manual Scenario
2. Goal-Oriented Scenario
Manual Scenario : -
In a manual scenario, you need to manually design the scenario as per the given performance metrics. While designing the scenario, you have to provide the inputs like how many users to run and for how much duration and in what way the Vusers have to be started and ended. Based on the scenario, LoadRunner executes the test.
Goal Oriented Scenario : -
In the goal-oriented scenario, you have to specify the target, and minimum and maximum no. of Vusers and duration. When the test script execution starts then LoadRunner checks whether the goal or target can be reached or not. If the target is unreachable then it stops the execution. The user load is started from min no. of Vusers to max no. of Vusers.
Load Runner provides you with five different types of goals in a goal oriented scenario:
- The number of concurrent Vusers
- The number of hits per second
- The number of transactions per second
- The number of pages per minute
- The transaction response time that you want your scenario
Q355.How-to design goal oriented scenario?
Answer:
Follow the following steps to design goal oriented scenario.
- Choose goal oriented scenario.
- Push the scripts into controller.
- Click on edit scenario goal.
- Provide profile name.
- Provide goal type and threshold point.
- Provide max and min users.
- Provide duration once it reaches the goal.
- Configure notifications if it is not able to reach goal.
- Distribute load in terms of percentage.
- Assign LG and check the connectivity.
- Configure SLA’s (if required).
- Set the result path.
Q208. What Is The Life-cycle Of Testing?
Answer:
- Planning the Test
- Developing the Test
- Execution of the Test
- Analysis of Results
Q210. What Drawbacks Do Manual Load Tests Have?
Answer: The manual load testing drawbacks are:
It is very expensive to do Manual Testing, as real users charge by the hour.
With manual load testing, load testing for longer durations like for 7 days won’t be possible, as users really work a maximum of eight hours daily.
You will not get accuracy for results correlation as there are delays between actions of users.
It is hard to do results collection as the results capture each other.
Q212. What Are The Automated Performance Testing Phases?
Answer:
The phases involved in automated performance testing are:
Planning/Design: This is the primary phase where team will be gathering the requirements of the performance testing. Requirements can be Business, Technical, System and Team requirements.
Build: This phase consists of automating the requirements collected during the design phase.
Execution: it is done in multiple phases. It consists of various types of testing like baseline, benchmarking testing.
Analyzing and tuning: During the performance testing we will be capturing all the details related to the system like Response time and System Resources for identifying the major bottlenecks of the system. After the bottlenecks are identified we have to tune the system to improve the overall performance.
Q213. What Is Distributed Load Testing?
Answer:
Distributed load testing: in this we test the application for a number of users accessing the application at a same time. In distributed load testing test cases are execute to determine the application behavior. Now application behavior is monitored, recorded and analyzed when multiple users concurrently use the system. Distributed load testing is the process using which multiple systems can be used for simulating load of large number of users. The reason for doing the distributed load testing is that to overcome the limitation single system to generate large number of threads.
Q. What is profiling?
Ans: Profiling is a process of pinpointing a performance bottleneck at minute levels. Performance Engineer or Developer performs software profiling task to make the application responsive. If you need to do application profiling then you might need to use tools for performance profiling of application servers. When profiling an application server, you identify issues at the level of code such as memory intensive API’s. In Database profiling, you can identify a number of things such as a full table scan query, high-cost queries and the number of executed SQL. These are some typical tasks come under profiling.
Q215. List Down Any Challenge You Faced In Your Performance Career And How Did You Overcome It?
Answer: Yes, I faced many challenges like defining the scope of application, break points which I over came by studying the historical data of application and based on them I decided the values, setting up the performance environment including proxy bypassing, connecting to Server under test.
Q216. What Is Ip Spoofing And Why Is It Used?
Answer:
IP spoofing is used to spoof the system so that each host machine can use many different IPs to create hypothetical environment where system believes that request are coming from different locations.
Q217. How Do You Identify Which Protocol To Use For Any Application?
Answer:
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, Load Runner 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.
Q218. How Do You Analysis Of The System to Identifying Issues?
Answer: We can study the various graphs generated by the tool such as Response time, throughput graph, running Vusers graph etc. and also we can see the server logs to identify the issues in system.
Q219. What Is Performance Engineering, How Its Different Form Performance Testing?
Answer:
Performance testing is the process where we identify the issues in the system.
Performance engineering is the process where we address the issues and rectify them.
Q223. Can You Tell A Scenario Where Throughput Is Increasing With Response Time Means When They Are Directly Proportional?
Answer: Yes it can be possible when you have lots of CSS (Cascading Style Sheet) in your application which takes a lot of time to display. We can expect this type of situation where throughput will be increasing as well as the response time.
Q12. What Can I Monitor With Load runner?
Answer : Monitor system bottlenecks during a test run and capture and display the performance data from every server or component.
Q107. How Do You Identify The Performance Bottlenecks?
Answer : 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.
Q130. What Types Of Bottlenecks Have To Identified In Your Latest Project ?
Answer : Poor GC, constant high usage of VM, connection pools, poor indexing and complex sql queries etc.
Q209. List Out Some Common Performance Bottlenecks?
Answer:
- Some common performance bottlenecks include:
- CPU Utilization
- Memory Utilization
- Networking Utilization
- S limitation
- Disk Usage
Q233. What are the common performance problem does user’s face?
Answer:
- Longer loading time
- Poor response time
- Poor Scalability
- Bottlenecking (coding errors or hardware issues)
- Low Throughput
- Server unable to handle the X amount of user load
- Heap Issue
- Thread Pool Issue
- Long-running DB query
Q.What are the common mistakes a performance tester does?
Ans: Some common mistakes are:
- Without a smoke test with few users, directly jump to multi-user tests
- Start another test without validating the previous test result
- Bombarding the server without pacing or think time
- Run the test with unknown workload details
- Too small run duration
- No user ramp-up period
- Lacking long duration sustainability test
- Confusion on user concurrency
- a significant difference between test and production environment
- No Network bandwidth stimulation
- Underestimating performance testing schedules
- Shorten the performance testing schedule and consider just a formality
- Incorrect extrapolation of pilots
- Inappropriate base-lining of configurations
- Perform bottleneck analysis without considering all the important graphs
- Perform the test without validating the test data
- Direct jump to multi-user tests
- Test results not validated
- Data not populated sufficiently
Q224. What Is The Reason Behind Performing Automated Load Testing?
Answer:
- Difficult to measure the performance of the application accurately.
- Difficult to do synchronization between the users.
- Number of real time users are required to involve in Performance Testing.
- Difficult to analyze and identify the results & bottlenecks.
- Increases the infrastructure cost.
Q221. How Do You Find Out The Performance Bottlenecks?
Answer: Performance Bottlenecks can be identified by using different counters such as response time, throughput, hits/sec, network delay graph. We can analyze them and tell where the suspected performance bottleneck is.
Q225. What Is Performance Tuning?
Answer: To improve the system performance we follow a mechanism, known as Performance tuning.
There are two types of tuning performed:
Hardware tuning: Optimizing, adding or replacing the hardware components of the system and changes in the infrastructure level to improve the systems performance is called hardware tuning.
Software tuning: Identifying the software level bottlenecks by profiling the code, database etc. Fine tuning or modifying the software to fix the bottlenecks is called software tuning.
Q226. What Is A Protocol And How Many You Have Worked On?
Answer: A protocol is a set of rules for information communication between 2 or more systems. There are many protocols such as Http/Https, FTP, Web Services, Citrix.Mostly used protocols are Http/Https and Web Services.
Q229. What Activities Are Performed During Performance Testing Of Any Application?
Answer: Following activities are performed during testing of application:
- Create user scenarios
- User Distribution
- Scripting
- Dry run of the application
- Running load test and analyzing the result
Q230. Explain The Sub-genres Of Performance Testing? Types of Testing ?
Answer:
Following are the sub-genres of Performance Testing:
Load Testing: it is conducted to examine the performance of application for a specific expected load. Load can be increased by increasing the number of user performing a specific task on the application in a specific time period.
Stress Testing: is conducted to evaluate a system performance by increasing the number of user more than the limits of its specified requirements. It is performed to understand at which level application crash.
Volume Testing: test an application in order to determine how much amount of data it can handle efficiently and effectively. Database is populated with large volumes of data and load tested to see the database performance
Spike Testing: what changes happens on the application when suddenly large number of user increased or decreased.
Soak Testing: is performed to understand the application behavior when we apply load for a long period of time what happens on the stability and response time of application..
Scalability Testing: Application’s effectiveness in scaling up to support an increase in user loads with the current infrastructure in place
Q235. Why does JMeter become a natural choice of the tester when it comes to performance testing?
Answer:
JMeter tool has benefits like
It can be used for testing both static resources like HTML and JavaScript, as well as dynamic resources like Servlets, Ajax, JSP, etc.
JMeter has a tendency to determine the max number of concurrent users that your website can handle
It provides a variety of graphical analyses of performance reports
Q236. Name important parameters considered for performance testing?
Answer:
- Memory usage
- Processor usage
- Bandwidth
- Memory pages
- Network output queue length
- Response time
- CPU interruption per second
- Committed memory
- Thread counts
- Top waits, etc.
Q237. What are the important factors you must consider before selecting performance tools?
Answer:
- Customer preference tool
- Availability of license within customer machine
- Availability of test environment
- Additional protocol support
- License cost
- Efficiency of tool
- User options for Manual Testing
- Vendor support
Q238. What is the difference between JMeter and SOAPUI?
Answer:
JMeter
It is used for load and performance testing HTTP, JDBC, JMS, Web Service(SOAP), etc.
It supports distributed load testing
SoapUI
It is specific for web services and has a more user-friendly IDE
It does not support distributed load testing
For most IDE, it has plugin support
Q240. Tell me the file extensions of RTS?
Answer: Extension of RTS is “.cfg” & “.usp”.
Q241. Tell me the file extensions of ANALYZER?
Answer: The file extensions of ANALYZER is “.lra”.
Q242. What are the benefits of Load Runner on testing tools?
Answer:
Benefits of Load Runner testing tools is
Versatility
Test Cases Results
Easy Integrations
Robust reports
Enterprise Package
Q244. Explain the steps required in JMeter to create a performance test plan?
Answer:
To create a performance test plan in JMeter
step 1:Add thread group
step 2:Add JMeter elements
step 3:Add Graph result
step 4:Run test & get the result
Q245. How you can execute spike testing in Jmeter?
Answer:
In JMeter, spike testing can be done by using Synchronizing Timer. The threads are jammed by synchronizing the timer until a specific number of threads have been blocked and then release at once, creating a large instantaneous load.
Q246. What is the throughput in Performance Testing?
Answer:
In performance testing, throughput is referred to the amount of data transported to the server in response to the client request at a given period of time. It is calculated in terms of requests per second, calls per day, reports per year, hits per second, etc. Performance of application depends on throughput value, higher the value of throughput -higher the performance of the application.
Q248. What are the different sections of the script? In what sequence do these sections run?
Answer: Load Runner 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. The action is executed in between the two.
Q249. How do you identify which protocol to use for any application?
Answer: 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, Load Runner 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.
Q250. 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 (vuser) to use different data on each run. This simulates real-life usage of an application as it avoids server from caching results.
Q251. How you identify Performance test use cases of any application?
Answer: 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 the critical and most important functionality of the application.
II. The user activity should be having a 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.
Q253. What is the Modular approach of scripting?
Answer: 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.
Q257. What is wasted time in VuGen Replay log?
Answer: 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.
Q258. How do you enable text and image checks in VuGen?
Answer: 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 setting.
Run Time Setting–>Preference–>Enable the Image and text check box.
Q260. What are the challenges that you will face to script the step “Select All” and then “Delete” for any mail account?
Answer: 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 the custom request and string building is required to build the post. (Note- This Qneeds practical knowledge. So please this practically and formulate your answer).
Q262. What is the number of graphs you can monitor using Controller at a time? What is the max of them?
Answer: 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.
Q267. How do you decide the number of load generator machine required to run a test?
Answer: 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).
Q268. What are the capabilities exactly you look for while selecting the performance testing tool?
Answer:
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 virtual users.
Q269. How does caching affect performance testing results?
Answer: 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.
Q271. Can’t we conduct the performance testing without tool?
Answer: We can conduct the performance testing without a tool. In realistic environment application accessed by 1,00,000 people, to simulate the realistic environment we have to require 1,00,000 people, which is not possible to require these many resources.
Below are the constraints stopping us to conduct the PT without tool.
- Accuracy
- Time
- Budget
- Resources
To over come the above issue. We have to use tools instead of manual resources.
Q272. What is your approach to gather NFR, if client doesn’t know anything about performance testing? If Application is already in production
Answer:
Get the production log files for 1 year historical data using Site analytical tools (or) splunk tool & try to identify top 5 usage days from that how many no. of visitors accessing that application, how many no. of page views are happening, which JSP/ASP pages are mostly accessed by end users & from which region they are accessing the application.
Based on the visitors you can identify no. of users, based on the page views you can
identify no. of transactions.
Based on the JSP/ASP pages you can identify the CBT’s, based on the IP address we can
identify the location/region &conduct baseline testing to identify the expected response time (or) to baseline the application.
Q276. If the dynamic value isn’t present in the response or it is a hidden value?
Answer: Use web_add_cookie( ) to pass the dynamic value.
Q277. How many ways I can find image name?
Answer:
- Open application --- Right click and Choose view source
- Navigate to snapshot
- In generation log
- Full mode of replay log
Q278. How can I find how many times text is present in response?
Answer: “savecount” will let you know the count of the text
Q279. Difference between web_reg_find and web_find?
Answer:
Web_reg_find
- It’s a registered function
- Have to write before the request
- Don’t require to enable any option
Web_find
- Current version we are using this
- It’s a non-registered function
- Have to write after the request
- Have to enable text and
- verification in runtime settings
- It’s a deprecated function
Q280. How to convert an integer value to LR variable?
Answer:
- “itoa” --------It converts integer to string
- Lr_eval_string ------- It reads the value from a variable
- Lr_output_message ----------It displays the message
Q281. How to compare two LR variables?
Answer:
lr_save_string(lr_paramarr_random("c_source"),"Ran_Source");
lr_save_string(lr_paramarr_random("c_desti"),"Ran_Dest");
if(strcmp(lr_eval_string("{Ran_Source}"),lr_eval_string("{Ran_Dest}"))==0)
{
lr_output_message("SOURCE & DESTINATIONS ARE SAME, CAN’T BOOK TICKET");
lr_abort();
}else
{
lr_output_message("SOURCE & DESTINATIONS ARE NOT SAME, CAN BOOK TICKET");
}
Q104. If You Want To Stop The Execution Of Your Script On Error, How Do You Do That?
Answer : 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.
Q148. What Are 2 Functions To Stop A Script (one Lr Function And C Function) ?
Answer : lr_abort() ;
lr_exit() ;
Q270. How will you stop the execution of a script on error?
Answer: 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.
Q282. How to write a value to a local file?
Answer:
long file;
After response body we have to write below operations
file=fopen("D:\\vny_src.txt","a+");
fprintf(file,"SESSION ID : %s\n",lr_eval_string("{c_sid}"));
fclose(file);
Q286. How to read a value from a local file?
Answer:
char buffer[100];
long file;
file = fopen(“C:\\xyz.txt”,”r+”);
freadf(buffer,sizeof(char), 20, file);
lr_save_string(buffer, “read_value”);
return 0;
Q285. How to add header information?
Answer:
Step 1: Right click on request and choose snapshot view
Step 2: Verify record time and replay time headers
Step 3: If there is a difference, please add information using web_add_header() function.
Q287. What are the few c functions you used in your carrier?
Answer:
1. strcpy() -----Copies one string to another
2. strcmp()------Compares two strings
3. strcat()-------Concatenates two strings
4. strlen()------Returns length of the string
5. strstr()-------Captures substring from main string
6. strtok()------Tokenize the string based on delimeter
7. strncpy()-----Copies n number of characters to another
8. sprint()------Writes a formatted output to a string
Q288. How to create a framework in LR?
Answer:
Step 1: Open the notepad.
Step 2: Write the statements into notepad.
Step 3: Save it as “.h” file.
Q289. In one of my business scenario, user has to login to application once and has to perform business scenario 05imes, then logoff from application? What is your approach?
Answer:
To achieve above scenario:
Record:
Login procedure into vuser_init()
Business procedures into action().
Logoff procedure into vuser_end().
Q291. Application is launching, events are generating but script is not available in the vugen physically?What is the problem?
Answer:
Solution 1: Problem might be SSL encryption.
Solution 2: Problem might be with browser compatibility.
Q292. How many places you can find server response?
Answer:
Full mode of replay log.
Generation log.
Snapshot view.
Tree view.
Empty LB and empty RB function.
Q293. How to pass value from one script to another?
Answer:
Solution 1: Create two actions in one script for both of the scenarios. Capture purchase order number from 1 st action and pass into the second action.
Solution 2: Using VTS also we can do and also with data staging also we can
Q314.How to pass a value from one script to some other or with in the script?
Answer: VTS we can share the data from either one script to another script or with in the script. (or)
Using data staging also we can pass the variable or value from one script to another script.
Q294. What is regular expression ? When we have to use this?
Answer:
When ever the boundaries are dynamically changing at that to extract dynamic value we will use this function.
Syntax is web_reg_save_param_regex(“pname = reg_exp”, “regex=name =”(.*?)” , LAST);
Q295. While running the test how to verify whether load balancing is happening properly aren't?
Answer:
While running the test we have to monitor resource utilization (C.P.U and Memory) each and every instance. If all the instances are using same level of C.P.U and memory, then we can conclude that LB is happening properly. If any one of the instance reporting less C.P.U memory utilization then we have to conclude LB is not happening properly.
Q298. How to pass a new value in to the script without opening the script?
Answer:
char * server;
server = lr_get_attrib_string(“host”);
lr_save_string(server,”url”);
Write the above statement in the script.
Set the value in the RTS and pass vary arguments in runtime.
Q299. What is Little’s law? How we can apply to this to testing?
Answer: In testing environment the requests flow will be like a queue to the server . So that we can apply littles law.
If we applied littles law …….. As per this law
No. of users = TPS * time
Q300. How to add multiple load generators for single script?
Answer:
Select the group
Click on vusers
Add new LGs against vusers
Q301. How to add multiple scripts against one group?
Answer:
Select the group
Click on vusers
Add new script for existing users or new users
Q302. On what basis you are deciding how many LGs required for test?
Answer: Based on below parameters, you can decide how many LGs are required
1. Number of users
2. LG configuration
3. Script variables and size
4. Protocol type
Q303. What is memory footprint test?
Answer: Testing with single user or 20 users and 50 users conducting how many users it can sustain called memory footprint test.
Current version of LR will send the notification whenever it reaches the threshold point.
Q304. When you are going to run agent as a process or service?
Answer:
For all web based applications, run agent as a service.
For all client server applications or which applications are communicating with hardware of the machine (NTLM or windows based applications), run agent as a process.
Q306. If the controller crashes before collating the result, what is your approach to recover the file?
Answer: If the controller crashes before collating the result, we can recover the result file.
Process:
- Go to load generator
- Select details
- Copy the path of the log
- Connect to LG through RDP
- Navigate to same path
- Copy “.eve” and “.log/.map” files
- Paste them into controller result path
Q308. What is the process you are following to identify the bottleneck?
Answer:
Once the test got finished, I am going to compare derived statistics with expected statistics. If both are not comparable, then I will start the process to find out the root cause.
Client side statistics analysis (analyzer, throughput, Hits per second, Response time).
Server side statistics analysis (Hardware and OS level statistics).
Application side statistics (Methods, I/O operations, DB, EJB, Packages etc..).
Configuration setting analysis (Current limit, Connection limit, Thread limits..etc..).
Q310. What are monitoring tools you used in your current project?
Answer: For monitoring I using Perfon ,JVisual VM , Dynatrace .
Q311. What is extension of perfmon?
Answer: .blg is the extension of Perfmon
Q312. What metrics we can monitor using JvisualVM?
Answer: Using this we can monitor metrics like threads , packages , operations like since how much time those are running, and also we can take thread dump and memory dumps.
Q. How can you identify performance test use cases for any application?
Ans: The core business functionality and volume are two major factors to priorities the performance test case. The core business functionality should have the topmost preferences and the user load comes at second place. After finalizing the scope of core business flow, check for the database operations, concurrency limit etc. and other functionality which has a moderate load that may increase in future.
Q. What is a protocol?
Ans: A protocol is a set of defined rules for information transmission between 2 or more systems. Basically, LoadRunner uses protocol term to differentiate the technology used for developing the application. For Example, A normal website which is developed in Java can be scripted using Web HTTP/HTML protocol. The selection of protocol depends on the architecture of the application and that should be known to a performance tester before starting the scripting. The application architect can provide accurate information in this regard.
Q. What are the high-level criteria to conduct the performance testing of an application?
Ans: The common criteria to consider the application in performance testing is:
Is there a chance to increase the load in the near future?
Is there a reasonable load on the application?
Performance testing can be parked in case few (like <5) users load is expecting.
Is there sufficient hardware available to conduct performance testing?
Is network supportive?
Q315.What is garbage collection (GC)?
Answer: When ever the objects are created dynamically at the same time we have to assign the memory to the objects. After some time we can see that there are two types of objects .Those are objects which are referred by the program and not referred by the program. Always we have to release the memory from the objects which are not referred by the program . This can be done by the garbage collector.
We can run this in two ways . One Is automatic and second is by manual.
Is it possible to give multiple ramp_ups ?
Answer: Yes. Using real world scenario option we can create multiple ramp-ups and multiple ramp-downs.
Who will provide the ramp-up, ramp-down settings?
Answer: No one will suggest to use specific ramp-up and ramp-down. As a performance tester, we have to derive the ramp-up time based on below parameters
1) Application type (web/client server)
2) Type of load balancer
What is Ramp up and Ramp Down?
Answer:
Ramp up- Rate at which virtual users add to the load test
Ramp Down- Rate at which virtual users exit from the load test.
What Is The Ramp-up And Where We Can Set This?
Answer : Ramp-Up option used to increases the number of Vuser in server and we can set the option through scenario schedule.
Suppose You Are Running A Scenario In A Controller And In The Middle You Want To Ramp Up 20 Vusers. Is It Possible?
Answer : Yes we can ramp up the Vusers.
What Is Ramp Up? How Do You Set This?
Answer : 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’.
How to copy scheduler settings (ramp up, duration and ramp down) from one script to another script?
Answer: Using copy scheduler options, we can copy the scheduler settings from one script to
multiple scripts.
What is Ramp-up and Ramp-down?
Ans: The user ramp up decides the rate at which virtual users add to the load test whereas ramp down instructs LoadRunner at which rate virtual users exit from the load test.
Example:
Ramp-up rate – 5 Vusers per 10 seconds
Ramp-down rate – 20 Vusers per 5 seconds
Why user ramp-up is recommended in performance testing?
Ans: It gives time to warm-up the server. Since the server is rebooted before performance test and its cache is empty which is not the case in the real-time scenario. Hence the server warm-up period helps the server to bring in live-like condition. It is a common observation that during the ramp-up period, the response time is slightly high.
Tell a scenario where throughput is increasing with response time means when they are directly proportional?
Answer:
Condition A:
a. when user load increases
b. the network has sufficient bandwidth
c. application crossed its average load bearing capacity
Condition B:
a. when there are lots of CSS (Cascading Style Sheet) in the application which are not ignored in the script.
In these cases,throughput increases along with response time.
Q317. In a page there are few links say 10 .For each and every reply links positions are changing. But every time you have to hit same link? What is your approach?
Answer: First identify the link which we want to hit every time. After that correlate that particular link. So that for each and every reply even though the position of the links may vary the tool will hit on the same link.
Q318. I wanna generate the requests in the form of concurrent groups ? How to achieve this?
Answer: To achieve this we have to record the script in URL mode.
Q319.What is legend ? What is the use of that?
Answer: Legend will instruct that which colour instructs which measurement.
Q222. What Is Think Time?
Answer: Think time can be defined as the real time wait between 2 consecutive transactions. For Example a real time user waits to evaluate the data he received before performing the next step, that wait time he takes can be stated as think time.
Q297. Where do you place the think time?
Answer: We should not place the think time in between start and end transaction.
Q. What is the Threshold level for think time and how can be this changed?
Ans: If the recorded think time is less than the threshold, VuGen does not generate a think time statement during recording. You also specify the threshold value using:
Recording options -> Script -> Generate think time greater than the threshold
The default value is 3. If the think time is less than 3 seconds, VuGen does not generate a think time statements. If you disable this option, VuGen will not generate any think times.
Q320. What is impact on the response time suppose if I included the think time in inside of the transaction?
Answer: The impact definitely will be there on the response time because we kept the think time inside of the transaction so that including the think time response time will be measured. So the response time will increase.
Q321. By mistake I included the think time in inside of the transaction? What I have to do rectify that problem?
Answer: In two ways we can do this. The best way is while analyzing the results in the analyzer we have properties option under that choose filter and select don't include think time.
Otherwise the alternative option is goto vugen script , paste the think-time outside of transaction and again execute the test. This process will take the more time.
Q391. Why we need to give think time in between requests?
Answer: Giving think time in between the requests is must because if we did not give the think time the requests will fair back to back this is not realistic.
So to create realistic environment and also to give breathing time to the server we will give think time in between the requests.
Q361.Where do you place the think time?
Answer: We should not place the think time in between start and end transaction. Always place the think time after end transaction.
Q322. How to gather the requirements ?If the application is green field application?
Answer: If the application is completely new at that we have to keep in touch with the business analyst(BA).
Q323. How to gather the requirements ?If we have a competitor in the market ?
Answer: If we have the competitor in the market at the time using traffic utility tools we will gather the competitor statistics and will use the same statistics for our test. Like identify NFR’s in terms of peak hours, half peak hours, no. of users, no. of page views from which location they are accessing the application, which pages mostly access by end users & what are the expected response times for every page.
Q324. What is response time?
Answer: The round trip of the request is called the response time. In general we will measure the response times to estimate the application performance under the load.
Q325. What is IP spoofing?
Answer: Masking the original IP address and generating multiple IP addresses is known as IP spoofing.
Q326.What is Entry Criteria?
Answer: Whenever the Pre-requisites are satisfied that is called Entry Criteria.
Q327.What is Exit Criteria?
Answer: Whenever derived statistics are meeting expected statistics that can be considered as Exit Criteria.
Q328.When we have to start Performance testing?
Answer:
The build should be released and stable
The build should be functionally satisfy.
The test data should be ready.
The test environment setup should be done.
Q329.What are inputs and outputs of Workload model?
Answer:
Input: Use cases, types of testing, number of users
Output: Pacing, think time and transaction mix
Q332.Tell me few algorithm names which can be used to distribute the loads to LGs?
Answer: Few of the algorithms which we can use to distribute the load to the LG(load generate)
1. round robin
2. IP sticky
3. Low load
4. least connections.
Q333.What is the significance of LG in performance testing?
Answer: Using LG we can generate huge amount of load on the targeted application in order to know the application behavior.
Q334.On what basis you are going to select the LG?
Answer: Using memory foot print test I will choose the LG. Based on the number of users and configuration of Load generates we can select the number of load generators how many are required to apply the load on the application.
Q335.How to handle OTP(one time password)?
Answer:
To handle OTP we have few solutions
sol 1: Tell the developer to use static otp.
Sol 2: disable the otp feature for testing.
Sol 3: ask the java file which is causing to generate the OTP and add that file and call that file when ever it is necessary.
Q336.If the dynamic value is generated buy a Java Script file & the same value is not available in the response?
Answer: Speak with the developer understand how the dynamic value is generating. If it is generated by Java Script file usually at Client side.
Take the Java Script which is creating a “.js” file in extra files and call the function whenever we like to generate the dynamic value.
Q337.To execute a test I have 1000 data points but I wanna instruct the user is that the user has to pick the data points from 50th data point? What is your approach to achieve this?
Answer: Using parameter properties options i.e. using first data line I will enter the data point number as 50 . So first 49 data points will be dis-appear. Then automatically the user will start to pick the 50th data point.
Q338.For the first time you replied a script . Script is failing ? What is the reason (even though there is no chance to generate dynamic values )
Answer:
Because of headers missing also some times the script may fail.
So compare reply time headers with recording time headers .If you found ant header is missing then add the header to the script using the function
web_add_header();
Q339.How to generate Date and time ?
Answer:
Using the date and time type parameterization we can generate date & time.
Q340.How many maximum data points we can load in a csv file ?
Answer:
36,000 data points
Q341.What is the use of the block concept in parameter properties?
Answer:
This concept is only available for unique each iteration and unique each occurrence.
When ever we wanna divide the data points into blocks and assign the same to the users at that time we will use this.
We can divide the data points into blocks in two ways .
1. manually: If we choose this option , manually we have to divide the data points into blocks and enter the same
2. Automatically : controller it self divides and allocate the same to the each and every user.
Q342.Which is the best process ? Either running user as thread or process ? Why?
Answer: Running user a thread is best process because running user as thread we can assign more users than running user as a process. And also if we run the user as thread , the user will utilize less memory.
Q103. What Is The Advantage Of Running The Vuser As Thread?
Answer : VuGen provides the facility to use multi-threading. This enables more Vusers to be run per generator. If the Vuser is run as a process, the same driver program is loaded into memory for each Vuser, thus taking up a large amount of memory. This limits the number of Vusers that can be run on a single generator. If the Vuser is run as a thread, only one instance of the driver program is loaded into memory for the given number of Vusers (say 100). Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.
Q344.How to assign an integer value to load runner variable?
Answer: Directly we cant assign an integer value to load runner variable because all the variables in load runner are strings. So convert integer to string using I to a function. Now converted value is string so we can use that directly where ever it is necessary.
Syntax:
int y=100;
Itoa(y,girmiti,10) ; //output= girmiti = 100
lr_save_string(girmiti,”final”); // output= final=100
where ever 100 we wanna use there we can use final.
Q345.What is the use of lr_set_debug_message () function?
Answer: Using this function we can set the debug message to the request at a particular level.
Q346.How many ways we can debug an error?
Answer:
- Using lr_set_debug_message () function
- using toggle point or breaking point
- executing script in step by step
What is the use of the function lr_save_string();?
Answer:
To assign a value to load runner variable we will use this function.
Syntax: lr_save_string(new-employee,”girmiti”);
Q349.What is your approach to The scenario, the user has to login to application, book and cancel tickets for multiple times for Every iteration has to perform login and log off?
Answer: We have to record all into action().
Q350.How to create multiple actions?
Answer:
Sol 1: While recording itself we can create multiple actions.
Sol 2: We can create new action using create new action option.
Q351.In one of my loan application, 70% loan has to be approved. 30% loan has to be rejected irrespective of the number of iterations. How to achieve this?
Answer: To achieve above scenario, I will insert both of the actions into one block and I will provide the % by choosing random property option.
Q352.I am recording a business scenario but I failed to record the events.
Answer: If you are failed to launch the application, then change the DEP (Data Execution Prevention) settings in my computer properties.
- My Computer
- Properties
- Advanced System Settings
- Advanced Performance Settings
- DEP
- Choose turn on DEP for all programs.
Q353.How many places you can find server response?
Answer:
From the following places we can find the server responses.
Full mode of replay log.
Generation log.
Snapshot view.
Tree view.
Empty LB and empty RB function.
Q354.How to design manual scenario?
Answer:
Follow the following steps to design manual scenario.
- Choose manual scenario.
- Push the script into controller.
- Choose schedule by scenario (or) schedule by group.
- Choose real world (or) basic schedule.
- Assign the quantity.
- Assign load generators.
- Verify connectivity with LG’s.
- Configure SLA’s (if required).
- Configure runtimes settings for every script.
- Set the result path.
- Provide ramp up, ramp down, duration.
Q357.What is load balancing?
Answer:
Load balancer is a URL, which will distribute load in between web instances.
As part of performance testing you will receive two kinds of URL.
1. Direct URL: It will access web instance directly.
2. Load balancer URL: which will distribute the load in between web instances.
Q358.While running the test how to verify whether load balancing is happening properly are not?
Answer: While running the test we have to monitor resource utilization (C.P.U and Memory) each and every instance. If all the instances are using same level of C.P.U and memory, then we can conclude that LB is happening properly. If any one of the instance reporting less C.P.U memory utilization then we have to conclude LB is not happening properly.
Q359.What are the actions you can perform while running the test?
Answer:
The following actions we can perform while executing the test.
- Add the users.
- Delete or kill the users.
- Add the script.
- Disable or delete the script.
- Verify the user runtime viewer.
- Verify the user log.
- Verify how many users running currently.
- Add or change the LG for down status users.
- Identifying which transactions are passing and failing.
- Verify who the users are ramping up, throughput, hits per second etc.
Q360.Is it possible to transfer RTS from controller to vugen? Why?
Answer: RTS will be transferred to controller from vugen script but not vice versa.
Q362.Where we can find a screen shot?
Answer:
Go to the vuser log and click on the camera symbol.
Navigate to the LG results path and you can find HTML page for every error.
Q363.How to add multiple load generators for single script?
Answer:
To add multiple generators we have to follow below steps.
- Select the group
- Click on vusers
- Add new LGs against vusers
Q364.How to add multiple scripts against one group?
Answer:
To add multiple scripts follow below steps
- Select the group
- Click on vusers
- Add new script for existing users or new users
Q365.How to schedule a test to start at particular time?
Answer: Using start time option (under scenario schedule), we can schedule a test to run at
particular time. Don't forget to hit start button after scheduling.
Q366.How to create multiple schedules in one “.lrs” file?
Answer: Using new schedule option, we can create multiple schedules for various kind of test.
Q368.Is it possible to extend the test duration while running the test?
Answer: Yes . possible to extend the test duration using pause and resume schedule option.
Q370.My script is working fine in vugen but not in controller?
Answer:
- Verify whether you are able to access the application from the LG
- Verify LG runtime quota.
- May be load balancing is not happening properly.
Q371.Tell me few common errors found in controller?
Answer:
- web_reg_find failed to find the text
- User abnormally terminated
- Authentication failed 403 forbidden error.
- HTTP 500 error.
- Memory violation exception error.
- No match found for the requested parameter
Q372.How to generate the reports?
Answer:
Step 1:Choose reports
step 2:Navigate to report template
step 3:Click on generate report
step 4:Save on required format.
Q373.How to create a template?
Answer:
Step 1:Select Tools
step 2:Navigate to templates
step 3:Create new template
step 4:Click on save and close button.
Q374.How to add existing template to current session?
Answer:
Step 1:Open “.lra” file
step 2:Go to tools
step 3:Choose templates
step 4:Select specific template
step 5:Apply to session.
Q376. How to measure the response time for file uploading request?
Answer: For uploading the file, put the transaction timers across the request and cross check afterwards by extracting the date/time information from the repository and load runner transaction.
And also using text verification function we have to verify whether successfully uploaded text is present or not.
Q377. How to measure the response time for file downloading request?
Answer: For downloading, put the transaction timers across that request and use web_get_int_property( HTTP_INFO_DOWNLOAD_SIZE ) function as controlling mechanism to stop the timer.
Q : How to capture download size for a response?
Answer: web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
Q378. How to handle dynamic page requests?
Answer: To handle dynamic page request , first we have identify the request which is causing to generate dynamic fields. Then for that particular request copy the body from the url mode and also identify string format .
After that using strcat() ,sprintf(), and for loop we have have to build the string.
Write web_custom_request() and substitute that builded string in the body of web_custom_request() function.
Q379. In a scenario i have 100 users but i have limited data which was not reusable. Now which parameter properties i have to use to design a test?
Answer: When ever we don't have sufficient data points at that using when out off values we can instruct either the user has to come out or continue in a cyclic manner or continue with the last value.
Q380. In a scenario i have 100 users but i have limited data which was reusable. Now which parameter properties i have to use to design a test?
Answer: If the data is reusable then either we can use sequential or random we can use as a parameter property to design the test.
Q381. I have 10 scripts. while executing those i wanna target each and every script with targeted number of users? Then what is your approach to design such type of scenario?
Answer: To design such type of scenario we have to select the scenario as schedule by group. So that individually we can distribute the load to the all he scripts.
Q382. I have 10 scripts. while executing those i wanna execute all in a single group for that what is your approach to design the scenario?
Answer: To design such type of scenario we have to select the scenario as schedule by scenario. So that controller will consider all the scripts as a single group.
Q384. There is any impact will be on the response times? Why?
Answer: The impact should be there on the response times because while loading a page for the first time all the supporting files will be loaded for this browser took some time this will be includes in the response time.
Where as without clearing cache files again the user triggered one more same request is the response would come too early than previous.
So we should remove cache and cookie files for each and every iteration.
Q385. While executing the test with 1K you found that system memory reached to 95%. The customer asked you to execute test with 1.5K ? Is it possible to kick off the test ? Why?
Answer:
Already the memory is reached to 95% so not possible to execute the test with the same instances. So definitely we have scale up our instances to kickoff one more test with 1.5K users.
Q386. For a retail application client asked that suddenly load should increase How to design such type of scenario?
Answer:
For this kind of scenario we have to design spike test.
Step 1: inject the script into the controller
step 2: copy the same script as a second script.
Step 3: choose schedule by group and assign targeted number of users to both the scripts.
Step 4: first run the first script and after some time to apply the load suddenly on the application run the second script .
Q390. How to edit the script?
Answer: Once the script was recorded then we can edit script by parameterization , correlation , inserting transactions, inserting validation points , inserting rendezvous points and also we can perform enhancements like using c functions and file operations.
Q394. What you will do when the response time is not meeting as required?
Answer: Once test got executed we will compare the response times with the expected if both are meeting that is called exit criteria if not then we have to drill down for the bottle necks from client side , server side , application side and also from the configuration side.
Q396. How you will convince the client to do performance testing of the application?
Answer: Once the application deployed in the production the total business of the client depends on that particular client application. If any unexpected things like suddenly huge amount of load will fall on the application might be the chance to crash the application at that time the client business may loss. This issue becomes the major issue to the client. So we have to tell about the signification and the need of the performance test and what happens if we didn't conduct the test to the client.
Q397. Why we need to create rules?
Answer: The clients are identified that few of the dynamic values are common across the technologies like user id , token id , session id etc. For each and every time to correlate dynamic values which are having common boundaries take some time. To avoid this we are going to create rules.
If we created a rules , when ever the boundaries were matched automatically the dynamic value will be correlated.
Q398. Is it possible to exchange the rules?
Answer: Yeah , possible. Once we crated a rule , the rule will be saved with extension as “.cor”.
So we can share this “.cor” file either in between the scripts or in between the peers.
Q399. How to generate the auto text verification functions for all the requests?
Answer: To generate auto text verification functions enable the option auto text verification under advanced option in the recording options.
Q400. How to regenerate the script once the the script was recorded?
Answer: To regenerate the script hit on recording option and choose regenerate .
Q401. What are the main advantages of the modular approach?
Answer: Modular approach helpful:
a. To reuse the code
b. To save the time
c. To save the effort
d. To save the money
e. To make the change at one place reflects in all the scripts
Q402. What are the criteria to conduct the performance testing of an application?
Answer:
The only criteria to drop the application in performance testing is:
Is there a reasonable load on the application? Performance testing can be parked in case few (like <5) users load is expecting.
Is there a chance to increase the load in near future?
Is there sufficient hardware available in the production environment?
Is network supportive?
Q403. How can you identify performance test use cases for any application?
Answer: The identification and the priority of the performance test case should be done on the basis of volume. Also, the first preference should be given to the core functionality. Testing is done to measure the performance of every action performed under core functionality/flow. Once the core functionality is covered then next preference should be given to those functionalities which are having database operations, concurrency limit etc.
Q404. Tell a scenario where throughput is increasing with response time means when they are directly proportional?
Answer:
Condition A:
a. when user load increases
b. the network has sufficient bandwidth
c. application crossed its average load bearing capacity
Condition B:
a. when there are lots of CSS in the application which are not ignored in the script.
In these cases,throughput increases along with response time.
Q405. Assume that I am the client , collect what are all requirements you will gather from me?
Answer:
we will gather the following requirements from the client
No. of users
the region from where the customers are going to access the application.
Types of testing to be conduct on the application testing
The hardware threshold statistics details like cpu , memory ,heap etc.
Expected response times
No. of transactions per hour
Q408. What is workload model? How it will be useful?
Answer: Work model is very useful to the tester who is going to design the scenario in the controller to simulate production peak hour statistics. Workload model contains CBT’s , load distribution based on type of the testing, pacing calculation , think time calculations.
Q184. What Is The Pacing?
Answer : In Pacing we can set the time to wait between iterations.
Q220. How You Can Calculate Pacing For Your Application?
Answer: We can calculate pacing by the formula as
No. of users = (Response Time in seconds + Pacing in seconds + Think Time) * TPS
Using fiddler tool we will record the script and then we will convert fiddler script into vugen script.
Q. How to get information about vuser?
Answer: We can get info about vuser using the function lr_who_am_i();
Q. What are the simultaneous user? What is the use of simultaneous users?
Ans: When all the users wait at the point and then hit the server at the same point of time without any delay. Such type of users is called simultaneous users.
Simultaneous users apply the full load at the particular functionality to find out the performance of it. A load of simultaneous user confirms that the particular page or functionality of the application can handle the desired load or not at a time.
Example: Tatkal reservation at IRCTC site
Q. What are the concurrent users? What is the use of concurrent users?
Ans: Concurrent users are those users which all are active in the system at a point in time but can do different tasks. You can simply say that they are parallel active users performing different activities on an application.
Concurrent users simulate the real-world scenario in the testing environment. There are very few moments when active users simultaneously hit the same functionality of the application else they remain concurrent.
Example: Behavior of the bank customers on the baking website
There is one practice scenario for simultaneous users and Concurrent Users which states:
The application must successfully handle 10 concurrent travel agents.
The application must be able to process 10 simultaneous flight bookings with response time not exceeding 90 seconds.
Point 1 implies that application must be able to handle 10 travel agent load (over a period of time) irrespective of their activities. Hence they used the term ‘concurrent’.
Point 2 implies that the application must be able to handle 10 simultaneous bookings (at a point in time). That means all the travel agents must click the ‘Book the Flight’ button at the same time. You can simulate this scenario via rendezvous point.
Some important points:
- Both the words mean “occurring at the same time”, but “concurrent” represents the events that occur over a period of time whereas “simultaneous” represents the events that occur at a point in time.
- The simultaneous user is a subset of the concurrent user.
- Simultaneous users can be concurrent users, but concurrent users cannot be simultaneous users.
- Generally, the number of concurrent users on an application is more than the number of simultaneous users.
- All the simultaneous users must be active and perform the same activities at a point in time.
- Concurrent users may be active or inactive and may perform different activities.
Standard Deviation
Standard Deviation is a key metric in performance test result analysis which is related to the stability of the application.
Definition:
The Standard Deviation is a measure of how response time is spread out around the Mean. Simply say, the smaller the Standard Deviation, the more consistent the response time.
Importance of Standard Deviation in Performance Testing
Standard Deviation in your test tells whether the response time of a particular transaction is consistent throughout the test or not? The smaller the Standard Deviation, the more consistent transaction response time and you will be more confident about particular page/request. Delivering a consistent experience to the end-user is just as important as delivering a fast and responsive experience. Let’s take an example:
Transaction Name RT RT RT RT RT Avg SD 90th %ile
(I1) (I2) (I3) (I4) (I5)
Login 4 6 3 4 8 5 2 6
Search 3 2 15 1 4 5 5.7 4
Logout 5 5 6 4 5 5 0.7 5
where:
RT = Response Time
I = Iteration
Avg = Average Response Time
SD = Standard Deviation
In the above example:
- Averages for all the transactions are the same. You cannot say the test results are good on the basis of average response time because averages are considered useless in Performance testing.
- The 90th percentile of “Search” transaction is better than the other two, but you can see I3 has 15 seconds response time. It is true we do consider percentile value as an important metric, but not alone. You also need to check how much response time is deviating.
- “Logout” transaction having lowest Standard Deviation (0.7) it shows response times are more consistent than other two and it is true we can see very less deviation in “Logout” response time 5, 5, 6, 4, 5. Also, its 90th percentile is 5.
- So, we got our best performer (Logout) and need to investigate the other two requests (Login and Search) for tuning purpose.
Calculation of Standard Deviation:
It is trivial to explain how Standard Deviation is calculated because as a performance tester you will be looking for a tool that calculates quick and correct Standard Deviation and save your time. Still, if you want to know the magic behind Standard Deviation calculation, then refer to the below steps:
- Calculate the Mean (the simple average of the numbers)
- Subtract the Mean from each number and square the result
- Add up all the values then divide by N-1
- Take the square root of that. It’s your Standard Deviation
Illustration of Search Transaction response time:
Step 1: Mean = (3 + 2 + 15 + 1 + 4)/5 = 5
Step 2:
(3-5)2 = 22 = 4;
(2-5)2 = 32 = 9;
(15-5)2 = 102 =100;
(1-5)2 = 42 =16;
(4-5)2 = 12 =1;
Step 3: (4 + 9 + 100 + 16 + 1)/4 = 32.5
Step 4: √32.5 = 5.7
=====================
Q. What would be your recommendation to improve performance measure?
Ans: Performance improvement recommendation always depends on the nature of the bottleneck. If there is any network related issue then you can recommend to optimize the latency and appropriate bandwidth of the network. At the database level, verify all indexes and sequences by running the integrated profilers. You may also recommend to optimize the database queries if DB takes more than expected response time. 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 js, CSS and image files which takes longer time.
Q. How does cache impact load testing results?
Ans: Caching has both positive as well as a negative impact on the load test result. A cache is a temporary memory which stores the browsing history. When the user visits a page for the first time then cache data are stored in the browser cache memory and when user hit the same page the second time, the cached data loaded from cache memory i.e. do not come from server, hence the time required to load the page will be less than that required to load the page for the first visit since much of the information required to load the page is grabbed from the cache instead of the server.
Positive Effect: If you are testing an application having all the unique users then disable the cache using VuGen runtime setting.
Negative Effect: If the application has the same set of users then you have to simulate the caching behaviour of the browser. You can enable the cache setting in the VuGen runtime setting.
To get more information about browser simulation of LoadRunner, click here and for JMeter click here.
Q. What is performance tuning?
Ans: Performance tuning is a mechanism to improve system performance. When a system/application perform as per expectation then that system/application is called as a tuned system or application.
Q. Who does application tuning after load testing?
Ans: Application Developer can tune the application. If a performance engineer has good knowledge of application then he can provide his suggestion. Even sometimes performance engineer has the sole responsibility to recommend how to optimise the performance of the application.
Q. What are the different types of Performance Tuning?
Ans: In order to improve the performance, there are three types of tuning methods:
- Hardware tuning: To enhance and add the hardware components of the system under test and changes in the framework level to augment the system’s performance comes under hardware tuning.
- Software tuning: To detect the software level bottlenecks by profiling the code, database etc. Also, to fine-tune or update the software to fix the bottlenecks comes under software tuning.
- Network tuning: To enhance the bandwidth, change in the networking software etc. comes under Network tuning.
Q. What are the network-related performance metrics?
Ans: The following are the network-related metrics need to monitor:
- Bytes Received per second
- Bytes sent per second
- Current Bandwidth
- Bytes total per second
- Output Queue length
- Packets Outbound Discarded
- Packets Outbound Errors
Q. What do you monitor during performance test execution?
Ans: During performance test execution of an application, we always look for both client-side as well as server-side metrics.
Client-side metrics include transaction response time, throughput, hits per second, Running Users etc. and server-side metrics include CPU Utilization, Memory consumption, garbage collector performance etc.
Q. How to extract server data for test execution and how to analyze that?
Ans: Every time post-test execution, we need to extract the data from the server which is the CPU, Memory, Garbage collector, Heap Memory which may be in graphical representation we need the third party tools like Dynatrace, JavaMelody, Jvisual VM Etc to get these metrics.
Q: How to analyse the data which is executing in different HOST(Servers0 in Performance center ?
Ans : In LR Analysis we will filter the data by using Host name Label in RAW DATA.
Q. What is the SLA (service level agreements)?
Ans: You can define service level agreements (SLAs) which measure performance test goals over time intervals during a test run, or over a whole performance test run. This is a mutual agreement between the client and the performance testing team to define an accurate pass/fail criteria of the scenario.
Examples are:
- Transaction Response Time (Average) per time interval
- Errors per Second per time interval
- Total Hits per run
- Average Hits (hits/second) per run
- Total Throughput (bytes) per run
- Average Throughput (bytes/second) per run etc.
Q. How to identify performance bottlenecks?
Ans: In order to find out the performance bottleneck, it is important to identify the root cause of the issue. Firstly analyse the performance testing graph and filter out the time window when the issue occurred. Secondly, correlate the client-side metric graph with server-side metric graph and analyse the server behaviour at that particular time. After that investigate the server logs and DB logs and find out the root cause. The application performance monitoring (management) tools make the root cause identification process easier and quicker.
Q. What are the performance bottlenecks that you found in the projects you were working? What are the recommendations made to overcome those issues?
Ans: Following are the bottlenecks found in the application during performance testing:
The bottleneck in the JavaScript and CSS request which increases the response time of the application webpage.
While login to the application which includes database related transactions; seems very slow, then I started my investigation by looking into the tables in the database. I found that indexing was not present in the tables. Once the indexing is attached for the tables then readability became very fast and response time improved.
Q. What are the Challenges that you face during scripting?
Ans: Challenges faced on the scripting:
Using the file functions in the scripting of Vugen
Using of the randomization techniques in scripting
Handling the correlation for the .Net and java applications like view state, even validation, session id etc.
Q. What is the memory leak? How do you find the memory leak?
Ans: Memory leaks are a class level bugs in any application, in which the application fails to release memory when no longer needed. Over the duration of time, memory leaks affect the performance of both the particular application as well as the operating system. A large leak might result in unacceptable response times due to excessive paging.
Q. What is the heap size? How do you analyze the heap size?
Ans: When a Java program starts, Java Virtual Machine gets some memory from the Operating System. Java Virtual Machine or JVM uses this memory for all its need and part of this memory is call java heap memory. When we get the errors such as out of memory exception then we need to analyze the heap size by taking the heap dump for that particular application.
The maximum heap size is represented in the parameter Xmx.
The minimum heap size is represented in the parameter Xms.
Q. What is Network latency?
Ans: Network Latency is the time taken by the channel to transfer the data from one end to another. Network Latency adds a delay in the overall response time.
Q. What is Network Performance?
Ans: Network Performance is typically measured in terms of the success of IP forwarding, the time and variation of packets of data transferring from source IP to destination IP successfully with the proper acknowledgement details.
=====
Q. 31 Why content check is used in the scripting?
Ans: Content check is used to validate the content present in the response of the page. It is recommended to use at least 1 content check on each page. Sometimes content-check is helpful to verify the completion of the flow like order completion by verifying “Thank You” message, homepage by verifying “Welcome” word in the response etc.
Q. 32 What are the types of content check available in LoadRunner?
Ans: LoadRunner provides two types of check:
Image Check: This check verifies the presence of a given image on a page during run-time.
Text Check: This check verifies the presence of a given text-string on the page during run-time.
Q. 35 How is each page validated in the script?
Ans: Each page of an application in the script is validated through the content of the response of the particular page. A content check verifies whether specific content is present on the web page or not. The content check keyword should be unique so that validation becomes more accurate.
Can we apply multiple content checks on a page?
A text or image check increases LoadRunner work which may reduce the number of Vusers generated by a load generator. Although the impact is very minimal. Hence it is advisable to use only one content check for a page or where experience has shown that the server sometimes returns an incorrect page. From the performance perspective, more preference is given to the ‘text check’ than ‘image check’ so add ‘image check’ only where it is really needed.
Q. How many graphs you can monitor using the Controller or Performance Center Test execution window at a time? What is the maximum number of them?
Ans: One, two, four and eight graphs can be seen at a time. The maximum number of graphs can be monitored at a time is 8.
==========================
Runtime Settings
The third sub-option under the Preferences tab is ‘Advanced’ in LoadRunner Runtime Settings. This setting majorly related to replay of LoadRunner script. Here, you can see 5 options which are:
LoadRunner - Runtime Settings - Preferences - Advanced
1. Use WinInet replay instead of Sockets (Windows only):
This instructs VuGen to use the WinInet replay engine instead of the standard Sockets replay. VuGen has three HTTP recording engines:
- Socket level data (default)
- WinInet level data
- Socket level and WinNet level data
and has two replay engines:
- Sockets-based (default)
- WinInet based.
The WinInet is the engine used by IE and it supports all of the features incorporated into the IE browser. The limitations of the WinInet replay engine are that it is not scalable and does not support Linux. In addition, when working with threads, the WinInet engine does not accurately emulate the modem speed and number of connections.
VuGen’s proprietary sockets-based replay is a lighter engine that is scalable for load testing.
It is also accurate when working with threads.
The limitation of the sockets-based engine is that it does not support SOCKS proxy.
If you are recording in that type of environment, use the WinInet replay engine.
2. Include File name and line in automatic transaction names:
It creates unique transaction names for automatic transactions by adding file name and line number to the transaction name. It is recommended to uncheck this option during the test because it requires more memory due to additional information added in the log file.
3. List non-critical resource errors as warnings:
By enabling this option, you can get a warning status in the log file for a function which failed on an item that is not critical for load testing, such as an image or Java applet that failed to download. This option is enabled by default. If you want a certain warning to be considered an error and fail your test, you can disable this option. You can set a content-type to be critical by adding it to the list of Non-Resources. It is recommended to keep enable this option.
4. Save snapshot resources locally:
This option is very much helpful for debug purpose. It captures the snapshot of a run-time viewer and saves those snapshot resources to files on the local machine. Due to extra memory consumption, keep this option disable during test execution; recommended only for script debugging purpose.
5. Enable Dynatrace AppMon:
This option enables the integrated Dynatrace Appmon in LoadRunner.
LoadRunner - Runtime Settings - Preferences - HTTP
‘HTTP’ setting helps to set the option required for the connection between load generator and application. The ‘HTTP’ setting is available under the ‘Preference’ tab of LoadRunner Runtime Settings. There are multiple options in ‘HTTP’ which you can set according to your requirement related to the HTTP connection. Here, you can define the HTTP version, extend the connection time-out, set Zlib header and other compression and cache options.
LoadRunner - Runtime Settings - Preferences - HTTP
Below are the options available in the ‘HTTP’ setting under the ‘Preferences’ tab of LoadRunner Runtime settings:
1. HTTP version
You can specify the version of HTTP to use. There are two options are available:
1.0
1.1
Whatever the version you choose, LoadRunner includes version related information in the HTTP request header whenever a Vuser sends a request to a Web server.
2. Keep-Alive HTTP connections
Majorly HTTP 1.1 supports this option. The default HTTP connection is usually closed after each request has been completed, meaning that the server closes the TCP connection after delivering the response. In order to keep the connection open for multiple requests, the keep-alive connection header can be used. Keep-alive is a term used for an HTTP extension that allows persistent or continuous connections. These long-lived HTTP sessions allow multiple requests to be sent over the same TCP connection. This improves the performance of the Web server and clients.
The keep-alive option works only with Web servers that support keep-alive connections. This setting specifies that all Vusers that run the Vuser script have keep-alive HTTP connections enabled. By default, this option is enabled.
3. Include Accept-Language request header
It provides a list of language which can be accepted by the server. Basically, this setting is used to update the user-agent string. There are 2 options available in the list:
- None
- en-us
You can also change the user-agent string through “Browser Emulation” setting. To get more details, refer the below URL:
LoadRunner Runtime Settings – Browser Emulation
Note: Browser emulation settings overwrites HTTP accept-language settings.
4. Mark HTTP errors as warnings
To issue a warning instead of an error upon failing to download resources due to an HTTP error, this option should be checked. By default it is unchecked.
5. HTTP-request connect timeout
The time, in seconds, that a Vuser will wait for the connection of a specific HTTP request within a step before aborting. Timeouts provide an opportunity for the server to stabilise and respond to the user. The default value is 120 seconds and the maximum value is 32000 seconds.
6. HTTP-request receive timeout
The time, in seconds, that a Vuser will wait to receive the response of a specific HTTP request within a step before aborting. Timeouts provide an opportunity for the server to stabilise and respond to the user. The default value is 120 seconds and the maximum value is 32000 seconds.
7. HTTP Keep-Alive timeout
An HTTP connection must complete the activities before reaching the defined time limit. Once the timeout reaches then the connections are closed. The default value is 60 seconds, the minimum allowable value is 10 seconds and the maximum allowable value is 2147483647 seconds.
8. Request zlib headers
It sends request data to the server with the zlib compression library headers. By default, requests sent to the server include the zlib headers. This option lets you emulate non-browser applications that do not include zlib headers in their requests. By default, it is enabled. To get more information on zlib, refer below link:
https://zlib.net/
9. Accept server-side compression
It informs the server to accept compressed data. The available options are:
- None (no compression)
- gzip, deflate (accept gzip or deflate compression)
- gzip (accept gzip compression)
- deflate (accept deflate compression)
The default value is “gzip and deflate” compression.
To manually add compression, enter the following function at the beginning of the script:
web_add_auto_header(“Accept-Encoding”, “gzip”);
To verify that the server sent compressed data, search for the string Content-Encoding: gzip in the section of the server’s responses of the replay log. The log also shows the data size before and after decompression.
Note that by accepting compressed data, you may see a significant increase in the CPU consumption of the server.
10. Delete unreferenced cache entries
In this field, you provide the number of iterations after that unreferenced cache can be deleted. Set to zero to never delete cache entries.
Note: HTTP 1.1 supports Persistent Connections (Keep-Alive HTTP connections), HTML compression and Virtual Hosting (multiple domain names sharing the same IP address).
LoadRunner - Runtime Settings - Internet Protocol - Preferences - General
1. Create snapshots during replay
It is recommended to use this option only for script debugging purpose. Enabling replay snapshots consumes more memory and slow down the replay speed. You can use this option to verify the page load content up to some extent.
2. DNS caching
It instructs the Vuser to save a host’s IP addresses to a cache after resolving its value from the Domain Name Server (DNS). This saves time in subsequent calls to the same server. But make sure if you have situations where the IP address changes, as with certain load balancing techniques, be sure to disable this option to prevent Vuser from using the value in the cache. By default DNS caching option is enabled.
3. Convert to/from UTF-8
It converts received HTML pages and submitted data from and to UTF-8. It is automatically enabled if the UTF-8 charset was enabled in the recording options.
- None
- UTF
- EUC-JP
5. Mark step timeouts caused by resources as a warning
By enabling this option, you instruct LR to issue a warning instead of an error when a timeout occurs due to a resource that did not load within the timeout interval. For non-resources, VuGen issues an error. By default, it is disabled. Do not get confused with the option “Mark HTTP errors as warnings” under “HTTP” tab. That option issues a warning while failing to download resources due to an HTTP error. This option issues a warning while failing to download resources when a resource did not load within the timeout interval.
6. Parse HTML content-type
When expecting HTML, parse the response only when it is the specified content-type:
- HTML
- TEXT
- ANY
The default value is TEXT. Here, point to be noted that text/XML is not parsed as HTML.
7. Step download timeout
The time that the Vuser will wait before aborting a step in the script. This option can be used to emulate a user behaviour of not waiting for more than x seconds for a page. The maximum value is 32000 seconds. The timeout settings are primarily for advanced users who have determined that acceptable timeout values should be different for their environment. The default settings should be sufficient in most cases which is 120 seconds. If the server does not respond in a reasonable amount of time, check for other connection-related issues, rather than setting a very long timeout which could cause the scripts to wait unnecessarily and does not show the true performance of the application/server.
8. Network buffer size
Using this option you can set the maximum size of the buffer used to receive the HTTP response. If the size of the data is larger than the specified size, the server will send the data in chunks, increasing the overhead of the system. When running multiple Vusers from the Controller, every Vuser uses its own network buffer. This setting is primarily for advanced users who have determined that the network buffer size may affect their script’s performance. The default is 12288 bytes. The minimum size is 1024 bytes and the maximum size is 214748 3647.
9. Print NTLM information
Enabling this option, print the information about the NTLM handshake to the standard log. Recommended only when needed.
10. Print SSL information
Enabling this option, print information about the SSL handshake to the standard log. Recommended only when needed.
11. SSL version
The version of SSL used by your application. The available options are:
- 2.0
- 3.0
- TLS 1.0
- TLS 1.1
- TLS 1.2
12. Maximum number of failure-matches to list as errors
It limits the number of content-check failures that are issued as errors, where failure is indicated by the appearance of a string (Fail=Found). This applies to match criteria using left and right boundary. All subsequent matches are listed as informational messages. The default value is 10. The allowable range is from 0 to 1000.
13. Maximum redirection depth
It indicates the maximum number of allowed redirections per Vuser. The redirection is a technique for moving visitors to a different Web page than the one they request, usually because the page requested is unavailable. Vusers often encounter redirection which can be easily identified by HTTP status code 3XX (HTTP/302 is very common). The default value is 10. The allowable values are in between 0 to 2147483647.
14. Maximum number of ‘META Refresh’ on a single page
Meta refresh is a method of instructing a web browser to automatically refresh the current web page or frame after a given time interval. This parameter helps to set a maximum limit for META refresh that can be performed per page. The default value is 2. The minimum could be zero and the maximum could be 2147483647.
15. Considered ContentCheck values as UTF-8 encoded
Enabling this option, stores the content check values in the ContentCheck XML file in UTF-8 format.
16. Limit the Tree view request body to
It limits the number of request body bytes displayed in Tree-View. Set to zero (0) for no limit. The default value is 2047. The allowable values are in between 0 to 2147483647.
17. IP version
The IP version to be used: IPv4, IPv6 or automatic selection. The default value is IPv4. The values in the list:
- Auto
- IPv4
- IPv6
18. web_sync retry interval
The time to wait (in milliseconds) between testing the condition that yields false and the next retry. The default value is 1000. The allowable values are in between 0 to 300000.
19. web_sync retry timeout
The maximum time (in milliseconds) during which retries are allowed. If the computed timeout exceeds the step timeout (as determined by the ‘Step download timeout’ setting), the latter is used.
20. WebSocket callback interval
The time interval in milliseconds, before repeating a call to a WebSocket callback handler. This must be a non-zero value. The default value is 500. The allowable values are in between 50 to 2147483647.
21. Prefetch and prerender callback timer interval
The time interval in milliseconds, before repeating a call to Prefetch and Prerender callback handlers. This must be a non-zero value. The default value is 500. The allowable values are in between 50 to 2147483647.
Authentication and Security options:
1. Add a fixed delay before authentication
It helps to add an extra delay on the login page. This delay is as same as think time. The only difference is authentication delay adds in transaction response time. Now, the question is why this additional delay option has been given? The reason is that it simulates the real user behaviour to enter authentication information like username, password, captcha and sometimes DOB etc. To type all this information in the real browser takes some time which can be easily simulated by authentication delay. Hence authentication delay is added in the transaction response time. Authentication delay is always given in millisecond(s). Its default value is zero.
2. Disable NTLM2 session security
Using this option (Check-Mark) you can use full NTLMv2 handshake security instead of the more basic NTLM2 session security response. By default, this option is unchecked.
3. Use the native Windows NTLM implementation
It enables the Microsoft Security API for NTLM authentication instead of the indigenous one. By default, this option is unchecked.
4. Override credentials in a Windows native NTML implementation
It enables the credentials provided by the user at the time of login. By default, this option is unchecked.
5. Enable integrated authentication
Using this option you can enable Kerberos-based authentication. When the server proposes authentication schemes, use Negotiate in preference to other schemes. By default, this option is unchecked.
6. Induce heavy KDC load
This setting instructs LR not to reuse credentials obtained in previous iterations. Enabling this setting will increase the load on the KDC (Key Distribution Server). To lower the load on the server, keep this option Uncheck so that the obtained credentials in previous iterations can be reused. This option is only relevant when Kerberos authentication is used. By default, this option is unchecked.
7. Use canonical name in SPN
Use the canonical name instead of the original hostname retrieved from the URL, to generate SPN (Service Principal Name). By default, this option is checked. Refer below details to get more details on canonical name:
https://msdn.microsoft.com/en-us/library/ms675436(v=vs.85).aspx
8. Append non-default port to SPN
This option appends the port number to the SPN if the specified port is a non-standard one (neither 80 nor 443). By default, this option is unchecked.
9. Enable retrieving keys from nCipher HSM
Enables Vusers to retrieve private keys from the nCipher HSM (Hardware Security Module). This option loads and initializes the CHIL engine necessary to retrieve these keys. By default, this option is checked.
=============================
Performance Test Environment Checklist
We all know about the importance of having test environment similar to the production system. Once we have setup the performance test environment, we can get an initial idea of the test environment state by comparing it with production environment based on the following factors:
Number of Servers: Number of physical and virtual servers
Load Balancing Strategy: The type of load balancing mechanism is in use
Hardware Resources: CPUs count and type, RAM capacity, Number and type of NICs
Software Resources: Standard application build apart from components of the AUT
Application Components: Application components description which needs to be deployed on the server
External Links: Links to third party application and other internal system components
=============================
How you can achieve more transactions with the same load?
Answer: To achieve more transactions either decrease the pacing time or simply remove the pacing time from RTS(run time settings) by selecting no pacing option.
Then back to back the scripts will be iterates and automatically at the same time we can achieve more transactions.
How to connect and disconnect to data base from vugen script?
Answer: Using lr_db_connect(); function we can connect to the database and using lr_db_disconnect(); function we can disconnect from the database .
How you will get vuser ip address?
Answer:
The lr_get_vuser_ip function returns the IPv4 address of a Vuser. When performing IP spoofing, each Vuser can use a different address. This function allows you to determine the current Vuser's IP address.
When you will use the fiddler?
Answer:
When ever we failed to record the script using vugen or when ever we find few action are not recorded in the script then will use fiddler tool.
Using fiddler tool we will record the script and then we will convert fiddler script into vugen script.
What is extension of fiddler script?
Answer: The fiddler script extension is “.saz”.
Is it possible to execute the jmeter scripts in the controller?
Answer: yeah . Possible to execute the jmeter scripts in the load runner component controller.
How to read the value from load runner variables?
Answer: To read the values from load runner variables we will use lr_eval_string();
========================
Sample Script :-
web_reg_find("Text=bing","SaveCount=welcome",LAST);
lr_start_transaction("Google_com");
web_url("Google.com",
"URL=http://www.Google.com",
"TargetFrame=",
"Resource=0",
"Referer=",
"RecContentType=text/html",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
if((atoi(lr_eval_string("{welcome}"))>0)&&(HttpRetCode==200))
{
lr_end_transaction("Google_com", LR_PASS);
}
else
{
lr_error_message ("Google_com failed with status code,%d", HttpRetCode);
lr_end_transaction("Google_com", LR_FAIL);
}
===========================
How Web Browser works(Browser Emulation)
What happens when we type the URL and click Enter in address bar:
Say that we are typing a URL in the address bar “http://www.google.com/performancetesting.htm”.
This URL has three parts:
1. Protocol (http://)
2. Domain Name (www.google.com)
3. File name (“performancetesting.htm”)
- Browser communicates with Domain Name Server (DNS) to convert the domain name (google.com) into IP address.
- Then with the IP address, it makes a connection with web server on port 80(default port for Webserver). Ideally this will be the ip address of a load balancer that manages a cluster of web servers.
- Browser then sends a HTTP (GET request in this case) asking for the content of the required file “performancetesting” .
- If the server cannot find the requested page, it will send an HTTP 404 error message. (404 means 'Page Not Found' as anyone who has surfed the web will probably know).
- The web browser receives the page back and the connection is closed.
- The browser then parses through the page and looks for other page elements it needs to complete the web page. These usually include images, applets, etc.
- For each element needed, the browser makes additional connections and HTTP requests to the server for each element.
- When the browser has finished loading all images, applets, etc. the page will be completely loaded in the browser window.
============================
Error HTTP Status Code 401 Unauthorized during script replay
There are lot of common errors that we keep encountering while using Loadrunner, like HTTP status code 401, 500, 403 etc.
If you encounter error HTTP Status Code 401 Unauthorized, during HTTP/HTML script replay then try below options:
Option 1: Add web_set_user(username,password,host:port );
Option 2: Record the script after changing the capture level to Wininet level data in Recording option> Network > Port mapping > capture level
Option 3: Run the script after enabling Wininet replay instead of sockets option in Run time settings > Internet Protocol > Preferences> Advanced
Option 4 : If none of the above option works, record the business flow with fiddler and compare the requests in LoadRunner and fiddler. Identify if any request/header/cookie is missing in the load runner script and causing the issue.
===========================
500 internal server error while testing an upload file scenario
Scripting a file Upload scenario is usually pretty straightforward, just do few correlations and the script runs without any errors.
But, sometime it becomes complicated when script keeps failing even after correlating all the dynamic values. The most common error encountered while executing the upload script is LoadRunner 500 internal server error .
It may look easier to switch from HTTP/HTML protocol to AJAX truclient in order to resolve the issues but that may lead to different complications, considering –
AJAX truclient is a GUI based protocol. So, the script during execution consumes more memory on your load generator machine. Therefor the number of users which can be simulated from a load generator is comparatively less
The script created has to be more dynamic to run without any issues that arise, when application starts performing slow under load.
Below are few tips on resolving the loadrunner 500 internal server error in HTTP/HTML script created for upload functionality.
Record a new script and compare the requests to identify if any dynamic value has been missed out
Check, if you have missed to convert the captured values to some special format (PLAIN to URL OR PLAIN to HTML etc.)
Enable parameter substitution and cross-check the values that are getting substituted are in the same format as the Original recorded format
The last and most important point is to go to the tree view (toggle to HTML view) of failing request and compare the items in header section for recorded and replay snapshot. You may find some important header missing during replay like a secure token value or something. Add corresponding web_add_header(); before the failing request in the script and re execute.
One of my transaction is taking is taking 150 seconds, and my step download time is a default (120 seconds). Could you explain to me why it is not throwing "Step download timeout error
Ans :- for Eg :
Whole transaction usually includes below
- DNS lookup time
- Connection Time
- Network Time
- Server Time
- Download Time
In your case, download would have taken less than 100 secs and all other have taken 50 secs.
So, no wonder you didn't get "Step download timeout" error.
===================================
Error HTTP Status Code 503 Unauthorized during script replay
we are getting this error, whenever we forget the parameterization for one value and other value are parameterized( one is sending message and one for conformation message for the same value eg phone number).
here the message is sent to 769342342 number and the confirmation should be same number but the confirmation is for different number which is not parameterized due to this one we are getting 503 error.
==================================
How to get last two values in web_reg_save_param. How can we get the values from changing the ORD one ?
Ans :- Use the lr_paramarr_idx and lr_paramarr_len() functions.
You will give “Ord=All” to capture all the name of all the items
web_reg_save_param("c_itemName",
"LB=itemname=\"",
"RB=\"",
"Ord=All",
LAST);
Additional Information: When you give “Ord=All” then the correction parameter (c_itemName) acts as an array and captures all the values which satisfy the left and right boundaries. If you want to choose any specific value then you can append “_<number>” in the correlation parameter and pass into the subsequent request. <number> denotes the place of the item appeared on the webpage.
For example, if you need to pick 2nd value then the correlation parameter will be “c_itemName_2”.
Solution:
To pick the random value from the correlation parameter, you have to use the following statement:
lr_save_string(lr_paramarr_random(“c_itemName”),”randParam”);
===================================
just to clarify - physical refers to the actual array or physical disk
logical is the partitions defined upon your physical disks.
e.g. if your home pc has one hard disk and you set a C: and D: partition then the logical disks are C: and D: but you only have one physical disk. generally on servers you'll have hardware arrays so if each array has only one partition physcial and logical disks will be the same.
===============================
How to insert bulk volume of data in to the application at one shot
Requirement:
There was a requirement, where we had to send a data in bulk amount (like->500 sets of data) by copy/paste mode to the application server.
Copy means– Need to copy from any excel sheet.
Paste means– All more than 500 data should have pasted in one shot. One data had 6 columns details (Like- name; address; emp id..etc).
After recording it is observed that for one string one Json request was being created, in the similar ways- for two request there was 2 Json request were created (Like- {Json1},{Json2}; format)
Approach:
Define a parameter (Like- xxxx) which save the value from parameter file, and keep changing accordingly the number of Iteration proceed.
Define one another parameter, which could work with strcat function. Strcat function will play a huge role in keeping and adding the new parameter value in terms of string. Strcat(string1, string2);. The value of string1 will concatenate the value of string2, and after that it will save again to string1.
For the above requirement-
We save first Json (this was a big request which had nearly 5 variable, which we plan to send it through parameter) request in string2 and with the help of strcat we added in to the string1.
Internally we ran one FOR loop, which was running till the all parameter value get read and get added to one string.
Ans:
char *Fstring=(char *) malloc(20480 * sizeof(char*));
char * fComa=(char*) malloc (20480 * sizeof(char*));
int i;
char * Json_BaseE, * Json_BaseT;
strcpy(Fstring,” “);
strcpy(fComa,”,”);
Json_BaseE=”{\”0\”:null,\”1\”:null,\”2\”:null,\”3\”:null,\”4\”:null,\”description\”:\”{Desc}\”,\”shipEndDate\”:\”{ShipEndDate}\”,\”shipStartDate\”:\”{ShipStartDate}\”,\”endDate\”:\”{EventEndDate}\”,\”startDate\”:\”{EventStartDate}\”,\”division\”:\”{Division}\”,\”type\”:\”{Type}\”,\”metadata\”:{\”isNewRow\”:true,\”originalValues\”:{},\”rowNumber\”:{RowNumber},\”cellStates\”:{\”metadata.rowNumber\”:true}}”;
for (i=0;i<26;i++) // This has defined to ready the parameter value from parameter file, it would be able to read 26 rows
{
Json_BaseT= lr_eval_string(Json_BaseE); // Eval function will enable “Json_BaseT” to save with the latest value of parameter
lr_save_string(Json_BaseT, “JB_1”); // It can be directly written as- lr_ssave_string(lr_eval_string(Json_BaseT),”JB_1″);
lr_next_row(“Desc.dat”); // This function help our function to read next available value from the parameter file. Dat is a extension of all parameter and Desc I have mentioned because I created a table name Disc, which had other dependent parameter also.
strcat(Fstring,Json_BaseT); // Both variable will concatenate, and the concatenated value get stored in 1st defined variable
if(i<25){
strcat(Fstring,fComa); // This fuction is able to strict the concatenation just before fComa value get added. If it will not here then final string will have Fstring (latest value) with fComa.
}
lr_output_message (“Full path of file is %s”, Fstring);
}
lr_save_string(Fstring,”NJson”); // Finally the NJson variable will have the latest value, and we can pass in to the body of the loadrunner request pattern.
No comments:
Post a Comment