Load Runner interview Question & Answers-6


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.
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.
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.
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
Q255. 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.
Q256. What is the advantage of running the Vuser as the thread?
Answer:
Running vusers as thread helps generate more virtual users from any machine due to small memory print of the vuser running a thread.
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.
Q259. What is the difference between web_reg_find and web_find?
Answer:
web_reg_find function is processed before the request sent and is placed before the request in the VuGen script whereas a web_find function is processed after the response of the request come and is placed after the request in VuGen script.
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).
Q261. What is a difference between pacing and think time?
Answer:
Pacing is the wait time between the action iterations whereas thinking the time is a wait time between the transactions.
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.
Q263. You have an application which shows the exam results of the student. Corresponding to name of each student its mentioned whether he passed or failed the exam with the label of “Pass” and “Fail”. How will you identify the number of passed and failed student in VuGen script?
Answer:
For this text check is used for the web page for the text “Pass and “Fail”. Through the function web_reg_find, we can capture the number of texts found on the web page with the help of “SaveCount”. SaveCount stored the number of matches found. For example-
web_reg_find("Text=Pass","SaveCount=Pass_Student", LAST);
web_reg_find("Text=Fail", "SaveCount=Fail_Student",LAST);
Q264. During the load test, what is the optimum setting for Logs?
Answer:
For the load test log level is set to minimal. This can be achieved by setting the log level to the standard log and selecting the radio button “Send a message only when an error occurs”.
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.
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.
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.
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.
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.
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:
1) Open application --- Right click and Choose view source
2) Navigate to snapshot
3) In generation log
4) 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
Web_find
  1. It’s a registered function
  2. Have to write before the request
  3. Don’t require to enable any option


  1. Current version we are using this
  1. It’s a non-registered function
  2. Have to write after the request
  3. Have to enable text and
verification in runtime settings
  1. 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");
}
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);
Q283. what is the difference between get and post method?
Answer:
Get
post
1. Not a secured request
2. It will send small amount of information to server
3. It can be available in history, cached and bookmarks.
4. To retrieve the information

1. It’s a secured request
2. Sends large amount of information
3.. It can’t be available in history, cached and bookmarks.
4. To submit the data to server



Q284. How to capture download size for a response?
Answer:
web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
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.
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;
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().
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
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:
  1. Full mode of replay log.
  2. Generation log.
  3. Snapshot view.
  4. Tree view.
  5. 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 stagging also we can
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.
Q296. What are the actions you can perform while running the test?
Answer:
1. Add the users.
2. Delete or kill the users.
3. Add the script.
4. Disable or delete the script.
5. Verify the user runtime viewer.
6. Verify the user log.
7. Verify how many users running currently.
8. Add or change the LG for down status users.
9. Identifying which transactions are passing and failing.
Q297. Where do you place the think time?
Answer:
We should not place the think time in between start and end transaction.
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




No comments:

Post a Comment