D

LoadRunner Components:
1. vugen
2. Controller
3. Analyser
4. Agent Process
5. Load Generator
1. vugen: Records the application and generates the script coding statements step by step.
2. Controller: used to create virtual users and execute the test with multiple users.
3. Analyser: used to analyse the Results and help you out to drill down to debug the problem.
4. Agent Process: Establish the Connection between the controller and LoadGenerator.
5. LoadGenerator: Generates the Load against the application.

LoadRunner Architectural View:
Response Time: The roundtrip of the requests.
Licensing:
Vugen……….Free of cost
Analyser……Free of cost
LoadGenerator….Free of cost
Controller……..Need the License based on :
- No.of virtual users License.
- Protocol bundle License.
NOTE: While buying any product from HP you will get a SAID(Software Agreement Identification Number).
Recording and Enhancements:
VUGEN
Protocol: protocol is set of rules.
Important Protocols:
1. web http/html
2. web click & script
3. citrix ica
4. sap web
5. sap gui
6. rte
7. web services
8. oracle nca
9. ajax
10. flex

CORRELATION:
Correlation is the concept to handle dynamic values which are generating
from server. (OR) Dynamic input to the server.
Correlation Types:
1. Auto correlation
2. Manual correlation
3. Correlation studio
Auto correlation: Automatically handles the dynamic values
Process:
1. Record the script(How to Record: https://www.youtube.com/watch?v=QCk_hGT8BaM)
2. Replay the script (at least once till LR 11.0 version)
3. Click the scan for correlation button
4. Choose the dynamic value from correlation results tab and click the correlation
button.
Internal Architecture of Auto correlation:
Once you click the scan for correlation button it compares record time response and replay
time responses and the differences will show up in correlation results tab.
If you click correlate button, it automatically creates a function with appropriate arguments.
Manual Correlation: We have to handle dynamic values manually.
Process:
1. Find out the dynamic values which are present in your script.
2. Find out the arguments (LB,RB…Leftboundary,Rightboundary) to pass in your
function.
3. Where to write the function (or) for which request the dynamic value was
generated.
4. Substitution.
Step 1:Solution:
Record the same business scenario twice with two different sets of data and compare both
of them.
Tools->compare with script.
Ex: www.text-compare.com
Step2:Solution:
Copy the dynamic value, go to the Generation log and try to find it there then copy the left text and right text of the dynamic value from first occurrence.
NOTE: Generation log contains Requests and Responses.
Ex:
Left text-> user session value=
Right text-> 111345.89798jhgjh>
Function:
Web_reg_save_param(“Poori”,”LB=user session value”,”RB=>”,LAST);
Step 3:Solution:
Execute the script in Fullmode.
Vuser->Runtime settings->log->extended log->Enable all the options.

And try to find out dynamic value in Replay log based on the LB/RB. And double click on the particular line it will assist you for which request the dynamic value was generated.
Solution 2: For step (3)
Once you found the dynamic value in Generation log point your cursor on the same line
find out what could be the next request with the help of ENDED, web_.
Step 4:Solution:
Substitute the parameter value where ever the dynamic value is present by pressing ctrl+H
Note:Whatever the values present in your script which are not entered through keyboard (or)
which are the values you chosen from the application those values should be correlated.
ORD: ORDINAL
Ordinal is one of the argument in web_reg_save_param(). Which will specify the occurance of Dynamic value.
ORD=3 ….. It captures the 3rd occurrence.
ORD=10 ….. It captures the 10th occurrence.
ORD=ALL ….. It captures all the occurrences.
Whatever you mention ORD=ALL variable will becomes as Array and holds all the values like variable_1,variable_2……
NOTE:
Whatever you written ORD=All variable_count (Hidden argument) will let you know how
many values are captured in to Array.
Follow below tutorial: #Manual Correlation
https://www.youtube.com/watch?v=xQXfNBaHclQ
Correlation Arguments:
1.Variable name: It saves the captured value.
2. LB: Left boundary indicates left text of the dynamic value
3. RB: right boundary indicates right text of the dynamic value.
4. ORDINAL: Indicates the occurrence of the dynamic value.
5. saveLen: saveLen=5 Specify how many no.of characters you supposed to capture.
6.saveOffset: saveOffset=1 How many no.of characters we supposed to skip.
7.search=body : This is an optimization technique to capture the dynamic value from
header/body.
By default from both( it will search for the dynamic value in header and body).
8.RelframeId : RelframeId=1.2.1
Specifies the frame id to capture the dynamic value from a specific frame.
9.NotFound: NotFound=warning
By default NotFound=Error if the LB & RB are not present in the response it will throws
Error and abort the script execution. If you are specifying NotFound=warning it will allow you to execute the script execution by throwing warning messages.
10.IgnoreRedirection:
100—-> Request successfully delivered.
200—Successfully Received response from server
300— Received responce but from other server( Redirected response)
400— Invalid request
500— server is not available
By default IgnoreRedirection=Yes
Web_reg_save_param() search for the LB & RB from the responses(Directed
server/Forwarded server).
If you are not willing to capture the dynamic value from Redirected response mention
IgnoreRedirection=No.
11.Convert: If we are capturing html formatted string and would like to pass as a URL formatted string then use argument Convaert =HTML_TO_URL.
Parametrization: Static input to the server (or) vary input to the server.
NOTE:
Whichever the values you entered through keyboard those values should be parameterize.
Parameter Types:
1. File
2. Date & Time
3. Iteration Number
4. Loadgenerator Name
5. Random Number
6. Table
7. Unique Number
8. VuserID
9. XML
10. Group Name
File Type : ctrl+l
Most of the time we used File type parameterization to pass vary input to the server.
Pa rametrization proprieties:
1. Sequential
2. Random
3. Unique
4. Each Iteration
5. Each Occurrence
6. Once
7. Same line as someoter parameter
NOTE:
Parameter file extension is .dat
Script file extension is .usr
1. Sequential Each Iteration:
Sequential stands for every user has to pic first data point.
Each iteration means value updating on every iteration.
2. Random Each Iteration:
Random means users will pic the values randomly.
3. Unique Each Iteration:
Unique stands for every user has to pic “First un-used data point”.
4. Sequential each Occurrence:
NOTE: Simulator functionality wont work for Occurrence property.
Occurrence means every user has to pic next value for every occurrence.
5. Random Each Occurrence:
Randomness is applicable for every occurrence.
6. Unique Each Occurrence
7. Sequential Once:
Once stands for if the user pics any one of the value the user has to use the same value for all the iterations & occurrences.
8.Random once:
If the user pics any one of the Random value he has to continue with the same value for all the iterations & occurrences.
9.Unique Once(important): 1-1 mapping
Every user has to pic first un-used data pint and he has to continue with the same value for all the iterations & occurrences.
10.Same line as some other parameter:
If there is a dependency between the data points user might take 10th data point from first dat file we have to instruct the user to pic same row number(dependent value / associate value) from second dat file (or) second column with the help of same line as some other parameter property.
Unique property Extra Features:
These extra features are available only for unique each iteration and unique occurrence
Features:
When out of values:
• Abort the user
• Continue in cyclic manner
• Continue with last value
Blocks in parameterization:
Complex parameterization:
We can create a dat file with multiple columns and rows for associated values.
Data wizard:
Data wizard will help you out pull the data from the database by connecting to database.
2.Date & Time:
Note: we can use dat, csv, xml as an input file for parameterization.
Xls wont support parameterization. We cant pass xls file as a parameter file.
Break Point – F9
Using Date & Time parameter we can pass current date, future date, past date by specifying
customized format.
3.Random parameterization:
We can generate the random number by specifying LB & Upper Bound values in desired
format.
4.Unique Number Parameterization:
With the help of unique number parameterization we can create unique number by
specifying LB & Upper bound values with a desired format.
Follow below tutorial: #Parameterization
Check Points:
Check points are verification points . we have 2 types of check points.
1. Text checkpoints
2. Image checkpoints.
1.Text Checkpoints:
Verifying the text in the Received Response.
NOTE: Keep check point only for Static text.
Check point function:
Web_reg_find(“Text=welcome”,LAST);
Web_reg_find(“Text=welcome”,”SaveCount=Poornima”,LAST);
After request we can write:
If(strcmp(lr_eval_string(“{poornima}”),”0”)==0)
{
lr_output_message(“check point failed”);
lr_abort();
}
Else
{
Lr_output_message(“Check point passed”);
}
2nd method for Text Check Point:
If(atoi(lr_eval_string(“{poornima}”))>0)
{
Lr_output_message(“Check point passed”);
}
Else
{
Lr_output_message(“Check point fail”);
}
2.Image Check point:
It will verify the specified image in the response of the request.
Check point function:
Web_image_check(“manasa”,”src=/images/hi.gif”,LAST);
This is not a registration function so you have to write after the request.
To make it work in script you have to enable “Enable image & text check points “ in RTS(Run time settings).
NOTE:
We have 2 functions to verify the text in a response.
1.web_reg_find()
2.web_find()
Web_reg_find() web_find()
1.It is a registration function 1.it is not regist. Function
2.you have to write before the request 2.you have to write after request
3.you don’t require to enable any RTS settings 3.you have to enable Textcheck
point in RTS
4.This function used in current LoadRunner Versions 4.It is a deprecated function.
Follow below tutorial: #Text and image check points
2.URL Recording Mode
Records not only user actions even server side resources too.
HTML MODE URL MODE
1.Records only user actions 1.user actions along with server side resources
too.
2.Easy to understand & maintain the script 2.Difficult to understand and maintain the
script.
3.Generates web_submit_data() & 3.Generates web_custom_request() functions
web_submit_form() functions.
4.Generates less no.of Correlation values 4.Generates huge no.of correlation values.
Correlation studio:
It handles the dynamic values while recording itself. Correlation studio having some rules
which will handles the dynamic values while recording itself.
NOTE:
You can create your own rule & you can export to collegue system(or) you can import from
other system.
Correlation studio extension is .cor
Process to create new Rule:
1. click on new Application
2 .click on new Rule
3. provide LB & RB along with parameter names
4. Click ok and Test the rule
Record Time Options: ctrl+F7
Script: we are using TSL(Test Script Language) in vugen, but enhancenments purpose we are using ‘c’ language.
Protocol: To choose the protocol.
Recording Mode: (important)
1.HTML Recording mode
2.URL Recording Mode
1.HTML Recording mode:
It will record every user action as a separate object.
FUNCTIONS:
1.converting integer to string
2.How to generate a random value from an Array?
3. Copying LR variable to C variable
4.How to copy values to Local files?
5.Writing all the available values in to Local File
6.Downloading a file
7.Converting string to float
8.How to generate random values & display the values
9. Stringtokenizer function
10.Reading the values from a local file(rewind)
WEB FUNCTIONS:
1.web_cache_cleanup(): Clears the content of the cache from browser.
2.web_cleanup_cookies(): Removes all cookies currently stored by the vuser.
3.Web_convert_param(): converts HTML_TO_URL and viceversa
4.web_reg_find(), web_image_check() : Text and Image check points
5.web_get_int_property()
6.web_reg_save_param()
7.web_reg_save_param_ex(): Introduced in 11.0 V. It is going to replace
web_reg_save_param() from 12.0 Versions.
Attributes & filters were changed when compare with web_reg_save_param().
Changes:
- Parameter name=session
- ORD replaced with ORDINAL
- Search replaced with scope
- Convert replaced with DFES
- RelframeID replaced with URL
8.web_set_certificate(): causes a script to use a specific certificate that is listed in the IE
repository.
9.web_set_proxy(): specifies that all subsequent HTTP requests be directed to the specified
proxy server.
10.web_set_proxy_bypass(): specifies the list of URL that the script can access directly by
passing the proxy server.
11.web_set_user(): specifies a login string for a web server.
NOTE: For all NTLM Authentication based applications we have to use web_set_user()
function (or)windows authentication purpose.
12.web_url(): Loads the specified web page.(By default it is a GET request)
13.web_save_timestamp_param(): It saves the current time stamp in milliseconds.
14.web_submit_data(): performs an unconditional (or) context less form submission. It will send information in the form of ItemData . It either GET/POST request. It will generate
HTML->Advanced->2nd option in RTS.
15.web_submit_form(): submits a form. It will generate based on your HTML based
recording options. This functions may be executed only in the context of previous operation.
16.web_set_max_html_param_len(): sets the maximum length of any HTML string that can be retrieved & saved as a parameter.
17.web_custom_request(): Allows you to create a custom HTTP request with any method
supported by HTTP.
Ex: Based on our input the next page is keep on changing then we go for
web_custom_request(). Usually the data in the form of BODY of the request.
Q: In how many ways we are going to verify the Response.
Ans: 1)web_reg_find(): Text checkpoint
2)web_image_check(): Image Checkpoint.
3) Based on the HTTP Status codes using web_get_int_property()
4) Based on the size of the Response using web_get_int_property()
5) Even we can use web_reg_save_param() function as a verification point.
LOAD RUNNER FUNCTIONS:
1. Lr_abort(): Aborts the execution of the script and continue with the vuser end
statements..
2. Lr_exit(): Exits from the script/ action /iteration.
Script continuation options:
LR_EXIT_VUSER, LR_EXIT_ACTION_AND_CONTINUE,
LR_EXIT_MAIN_ITERATION_AND_CONTINUE….
3. Lr_db_connect(): connects to a Database.
4. Lr_think_time(): Pauses execution between commands in a script.
5. lr_output_message(): sends a message to log files, output window, and other test report
summaries.
6.Lr_message(): sends a message to log files and output window it won’t sends a message
to the report summaries.
7. Lr_error_message(): sends an error message with location details to the output windows, log files, and other test report summaries along with controller output.
8. Lr_start_transaction() & lr_end_transaction(): To measure the response time of the
particular request. Ctrl+T (start) , ctrl+d (end)
9. Lr_stop_transaction() & lr_resume_transaction(): Freezes the reporting of a transaction data. Resumes reporting transaction data with in a script.
10. Lr_save_string(): It assigns a value to LoadRunner variable.
11. Lr_save_int(): saves an integer to a parameter.
12. Lr_set_debug_message(): sets the message level for the script execution.
13. Lr_save_datetime(): assigns the current date & time to the parameter.
14. Lr_paramarr_idx(): returns the value of the parameter at a specified location in a
parameter array. It will pic the specified value from an array.
15. Lr_paramarr_len(): Returns the no.of parameters in the array.
16. Lr_load_dll(): Loads an external DLLS.
17. Lr_eval_string(): Read the value from variable.
18. Lr_eval_string_ext(): Creates a buffer & assigns it to the input string after evaluating
embedded parameters.
19. Lr_start_timer(), lr_end_timer(): starts a timer and stops a timer.
20. Lr_save_searched_string(): searches for an occurrence of a string in a buffer and saves a portion of the buffer after that string to a parameter.(captures a substring to a main string)
Ex: char cbuff[100];
Strcpy(cbuff,lr_eval_string(“{flight_1}”));
Lr_save_searched_string(cbuff,strlen(cbuff),1,”:”//search for second occurance of 02//, 0
//skips the spaces after 02//, 2 //put the next 2 chars//,”hi”);
Lr_output_message(“substring values is %s”,lr_eval_string(“{hi}”);
21. Lr_vuser_status_message(): send a message to the vuser status area.
22. Lr_next_row(): Advances to the next row in the parameter data file. It works on dat files.
23. Lr_advance_param(): Advances to the next available parameter values, it works on
columns names.
24. vuser_init(): It contains login procedures.
25. Action(): It contains Business Procedures.
26. vuser_end(): It contains Logoff procedures.
NOTE: you can create multiple actions as per the Business flow.
Labels: Please try to avoid labels in your script.
Syntax: hhh: | hhh:
Web_reg_find(…) | R1
| R2
If(….) { …. | goto hhh;
Goto hhh; |
}
Dynamic Transaction names: Generates the report with dynamic naming conventions.
Syntax:
Lr_start_transaction(lr_eval_string(“login_{pUser}”)
Web_reg_find(…)
Web_submit_data(..)
If(strcmp(lr_eval_string(….))
{ lr_output_message(…)
Lr_end_transaction(lr_eval_string(“login_{pUser}”),LR_FAIL);
} else { lr_output_message(…) lr_end_transaction(lr_eval_string(“login_{pUser}”,LR_PASS);
}
Data staging:
Case study:
I have a business process having 2 script
1)create purchase order
2)process purchase order.
From the above what ever the purchase order(PO) number created in 1st script it has to
pass in to the 2nd script to process it.
Solution: 1)creating 2 Actions in 1 script what ever the Action 1 output (PO Number) you can use in Action2.
2)Data Staging
In offline i am executing first script for multiple times and saves all the PO numbers in to a
file before clicking of actual test. I will load the test data ( file data) in to the second script.
3) VTS (Virtual Table Server):
It is a tool that shares data & parameters b/w LoadRunner vusers. Unlike standard
parameterization functionality, VTS use a centralized repository to store data, therefore
data can be passed b/w vusers during the load testing.
CONTROLLER
Controller: It is a Loadrunner component where we can create multiple vusers and execute
the test with multiple users.
Manual Scenario: We have to design the scenario as per the requirement by providing
no.of users, Ramp-up, Ramp-down time & duration.
Follow below tutorial: #Manual Scenario
Goal Oriented scenario: Controller itself design the scenario to reach the Goal by providing no.of users Ramp-up & Ramp-down times.
Follow below tutorial: #Goal Oriented scenario
NOTE: Controller having 3 Tabs.
1.Design Tab
2.RUN Tab
3.Diagnostics Tab
Scenario extension is .lrs
Result file extension is .lrr
SLAS ( Service Level Agreements) :
1.Transaction Response Time
2. Error Per Second
3. Total Hits
4. Avg. Hits per Second
5. Total Throughput
6. Avg Throughput
Ramp-Up: Gradually increase load on the server.
Ramp-Down: gradually reduce the load from the server.
Stand alone time: This is the test duration time which excludes Ramp-up, Ramp-down
timings.
Elapsed Time: This is the Test duration time which includes Ramp-up, Ramp-down & stand alone times.
Schedule by Scenario: All the scripts behave like a one scenario by sharing Ramp-up, ramp down, duration.
Schedule by Group: Every script behave like a one scenario by having their own Ramp-up,
Ramp-down, Duration.
Case study 1:
Ramp-up every user per 10 secs. Conduct the test for 1 hr. There is 3 scripts.
Solution: In the above scenario we can design/ choose schedule by Scenario.
Case study 2:
All the scripts having different Ramp-up timings and Test duration timings.
Solution:Design the scenario in schedule by Group.
Real-world schedule:
Where you can create multiple actions in Global schedule.
Basic schedule:
Basic Actions are available Ramp-up, Ramp-down, duration.
RUN TAB:
User Status
Down Status
Pending Status
Initialization Status
Ready Status
Run Status
Rendezvous Status
Passed Status
Failed Status
Error Status
Gradually exiting
Stop
Check list to design the Scenario:
1.Choose the scenario type either Manual (or) Goal oriented .
2.push the scripts in to Controller.
3.choose schedule type either schedule by scenario (or) schedule by group.
4.Assign the Quantity against every script.
5.Assign the Load Generator against every script.
6.Check the connectivity of every Load Generator.
7.Set the Run Time Settings (RTS) for every script.
8. Choose RUN mode either Real world/ Basic
9.Provide the Ramp-up, Ramp-down , Duration.
10.Set the Results Path.
Throughput: Bytes received from the server.
Action Items you supposed to perform while Running the Test:
1.Add the Users
2.Kill the Users.
3.Add the Group
4. Disable/ Delete the Group from the test.
5.Identify which transactions are failing or Passing.
6.Identify which script, which line numbers, which Load Generator , which vuser Id causing the Error/ Failure transaction.
7.Verify the vuser log
8.verify the Run time viewer
9.Verify how the users were Ramper up & how they are running , what are the response
times, Throughput, Hits per second, Connections, Server side resources.
Goal Oriented Scenario:
Check list to design the Goal Oriented Scenario:
1.Choose the Goal Oriented scenario in controller start up page.
2.Push the Scripts in to controller.
3.Assign the LG Machines and check the Connectivity.
4. Disrtibute the Load in percentile mode.
5.Configure the goal by specifying Goal type, min.vuers, max vusers, duration of the test
after reaching the goal.
Types of Goals:
1. Vusers
2. Hits per second
3. Transaction per second
4. Transaction Response Time
5. Pages per minute.
Run Time Settings(RTSF4):
Extension of RTS is .cfg & . usp
Run Logic: Indicates no.of Iterations.
NOTE: test duration setting will override the Run Logic.
Pacing: Time delay b/w the Iterations
We have 4 types of Pacing.
1. No pacing
2. Fixed Pacing
3. Random Pacing
4. Interval Pacing
Log: Log has two settings
1. Standerd Log: Standard log will show only standard messages in Replay log.
2.Extended log: will send parameter capturing & substitution ,full trace & function calls in Replay log.
NOTE : we have some other 2 options those are
1.send messages only an Error occurs: whenever you encountered an Error (or) Issue while
running then only you can see log messages in Replay Log.
2.Always send messages: Always send messages to Replay Log.
Think Time:
Think Time is the time to choose new action after getting previous response.
(or)
Time delay b/w the User actions.
Options:
1. Ignore Think time
2. As Recorded
3. Multiply think time
4. Random Think time
5. Limit Think time.
Q: If you increase the Think time what is impact on the server performance & Response
Times?
A: If you are increasing the Think time in b/w the transactions server performance will
improve & you will receive good Response times.
Q: If you reduce the Think time what is impact on the server performance & Response
Times?
A: If you are reducing the Think time there is more burden on the server eventually server
performance may degrade will get delay response times.
Function: lr_think_time(60);
Global Think Time:
Int x=10; (globals.h)
Lr_think_time(x); (Action)
Always place your think time before the start transaction or after the transaction. If the
think time is present in b/w the transactions request Response time will include think time
also.
NOTE: To exclude the think time from Response time we have an option called Exclude
Think Time in Analyser.
Additional Attributes: To declare the Environment variables.
Miscellaneous:
Continue on Error: Continue script execution even when an Error Occures.
Generate snap shot on Error: It will generate the snap shot for every Error you can verify
them in Result file (or) Controller vuser log( by clicking camera symbol).
Case study 1:
Run vuser as a process.
For all client server apps(SAP GUI or Desktop based apps. EX: SAP GUI/ Calculator) you have to run vuser as a Prosess.
If we are running vuser as a process every vuser required one MDRV(Multi Driver
Program) Engine.
Every MDRV engine required 5Mb memory in the LG Machine.
Running Vuser as a Thread:
For all web based applications you have to run vuser as a Thread. If you are running vuser as a thread multiple users will share one MDRV engine .
NOTE: Approximately 50 vusers use one MDRV engine.
Memory Foot Print in Load Generators:
The no.of Load Generators depend on the below items.
1.Ram size of the Load Generator.
2.No.of Variables & Memory allocation for variables in LR Script
3.How you are running vuser as a Process or a Thread.
If you are running vuser as a process
1 vuserprocess1 MDRV Engine5mb
If you are running vuser as a Thread
1 vuser (50)Thread1 MDRV Engine2mb
NetWork:
Speed simulation: It specifies to use maximum/ predefined/ custom band width for your
test.
Browser:
Browser Emulation: (User Agent setting)User agent= Browser
By configuring user agent we can invoke multiple browsers(Mozilla, IE, Opera, safari..) to
invoke the application from Load generator.
Simulate Browser cache: Uses the cache files from the Browser.
Simulate a new user on each Iteration: every user behave like new user for every
iteration by downloading non-html resources.
NOTE: Non-html resources are available in script as Extraas(css, js, png, jpeg, jpg). If you
comment Extras even though those will download automatically as per your request.
Internet Protocol:
Proxy: Web_set_proxy()
Options:
No proxy Obtain the proxy from browser/ custom proxy.
No Proxy: Directly Hits the application.
User custom proxy by providing proxy server name & port number using the setting.
Preferences:
Options:
HTTP request connection Time out(sec):
User can wait to establish a connection for 120 secs. If he is not able to establish a
connection from the test use 1000sec (in realistic env)
A time unit with in which a receive operation for an HTTP request should complete or else
the request will be failed.
Note: By default 120 change 1000
Please understand application idle session time out, active session time out before
configuring above settings.
Step download time out:
Its related to your function(request) execution time. If the function is taking more than 120 secs to execute script will throw an error like “step download time out error”.
By default 120sec change to 1000.
Download Filters:
You can(exclude) avoid down loading a specific URL by specifying that URL in exclude
address list.
Content Check:
It is a global text verification point.
Extension of the rule global text verification rule is “.xml”
Rendezvous Point:
It is the point to instruct Vusers wait at certain point once the specified number of the users arrived the point execute the subsequent request.
Function: lr_rendezvous(“payment”)
Step1: write the function in script
Step2: open the controller go to scenario select Rendezvous.
Step 3: Set the policy by providing number of users and the time limit.
Case Study 1:
Once the test is completed controller has to collate .eve & .log files from every load
generator and it will create .lrr file.
Note: If controller crashes before correlating the results manually we have to copy in every
load generator .eve & .log files copy in every LG and paste in result file and collate again.
Common Controller Output Messages:
Load Generator Connectivity Issues:
1.lrbridge.exe was not created on Host machine
2.Communication Error
3.Fail to connect to the Load Generator
4.Two way communication failed
NOTE:
• We have to install listeners in Load Generator when ever Firewall / proxy server is
not allowing you to connect to the Load Generator.
• Speak with IT infra guy to open the port to establish connection b/w controller &
Load Generator.
C Interpreter Error:
1.Compilation Error
2.C code Issues
3.Memory violation Error
Scripts (or) vusers not transferring to the Load Generator:
1.Script might corrupted.
2.Naming convention of the script is too long
3.Script name contains special chars
4.Dat files are missing, Dat file naming convention causes the issue.
No match found for the requested parameter :
Correlation Issue
Abnormal Termination caused by MDRV Engine:
• Communication Errors
• Load Generator problem
• Issue with agent
• Running vuser as a Thread instead of Process for client server apps.
Connections prematurely shutdown or permanently shutdown:
Connections issue with web server
Max Client client Error
Connections Reached limit in the web server
Web _reg_ find() failed for text =“welcome”
Text check failed due to the application issue (or) Test data issue.
Insufficient data points in puser data file:
Test data is not sufficient in parameter file
Custom messages:
Ex:1
Lr _vuser_ status_ message(“%s”,lr_eval_string(“{puser}”));
(OR)
Lr _vuser_ status_ message(“%s”,lr_eval_string(“{pIteration}”));
Ex:2
Lr_error_message(“Log on Success”);
HTTP Status code Error message 500:
• Server not found
• Application not available
Some common Controller Errors:
• ERROR-120 : Stepdownload timeout in performance center controller load test
execution. There where no errors in vugen script execution can resolve it?
• HTTP status code : 502 Proxy error.
• Failed to initialize : Reason Timeout
• ERROR – 82000 : one (or) more of the scripts have illegal names . it is possible that
2 files are using the same name and Directory.
• ERROR : 84805 The User files are not transfer to local load generator
• ERROR- 29987 : Process “traceroute_server.exe” was not created when connecting
to a Remote sever.
• ERROR -30932 : “fail to open eve file”
• ERROR-29989 : process “lr_bridge.exe” was not created on Remote host, reason
Communication error.
• ERROR: Communication Error : Failed to bind socket. A process on the machine is
already bound to the same address.
Running Agent as a Process/Service:
- Normally we run Agent as a service for most of the apps.
- If we are running Agent as a service only 1 MDRV Engine will invoke for multiple users.
Ex: For web based applications. - If you are like to run Agent as a process for client appa every User required 1 MDRV
Engine
Invoking Agent through command prompt
- magentservice.exe to make/invoke Agent as a service through command prompt
Q: How we verify whether Agent running as a Process or Service?
A: Go to Task manager and verify the agent as a process (or) service.
ANALYSER
Analyser file Extension is .lra
Cross results option: To compare two lrr files
Reports: Bydefault we can generate doc report, Html report, crystal report, PDF report.
Granuality: Time difference b/w two saturation points.
NOTE: Granuality must be integer for 5-356 for throughput and Hits per second graphs.
For all remaining graphs we can give minimum 1 sec also.
Q: What is the Difference b/w Request and Hit?
A: Request It is a user action it might be Successful or not
Hit It is a successful Request. One request having multiple Hits.
90th percentaile: 90 % of the transactions are getting complete before the particular time.
Summary Report:
It contains information about the test summary which includes scenario name, Result path,duration, period, max. No.of users, throughput, hits per second, transaction avg,min,max standard deviation response times & Http Response times.
Response time: Round trip of your request time.
Graphs: We can add, delete, merge the graphs as per the requirement.
Properties: Here we can include, exclude think times.
We can generate various (80,90,95) percentail Response times.
NOTE: Analyser contains various kinds of windows like Explorer, Properties, Controller
output messages, Raw data, Legend etc…
Analysis:
Q: what is the approach usually you followed to analyse the Reports (or) what is the
approach to find out the Bottlenecks?
A: Usually I started with analysing below items
1) Client side statistics
2) Web page diagnostics (or) Network related issues (or) Bandwidth
3) server side statistics
4) Application side statistics
Client side statistics:
1) Running users
2) Throughput
3) Response times
4) Transaction per second
5) Pages per second
6) Connections
7) Pass / fail transactions
Merging Graphs:
We have 3 ways to merge the Graphs
1) Overlay graphs : It plots a graph with two y-axis
2) Tile Graphs: view the content of two charts one above the other by sharing X-axis
3) Correlate graphs: plots 2 Y-axis of 2 charts against each other (or) compare 2 Y-axis.
Relation b/w Hits per second and Throughput:
Both should be directly proportional.
If both are not in directly proportional ……Cause: N/W bandwidth could be a problem
Web server having the problem
Application itself is a problem
Relation b/w Running users and Hits per second:
Both should be directly proportional.
If Running users are increasing Hits are not increasing then application itself having problem(or) application is not responding well.
Relation b/w Throughput and Response time:Both should be inversely proportional.
NOTE: As per the performance testing both should be inversely proportional. But
sometimes it may not true that is depend on the boundaries.
Relation b/w Running users and Connection:Both should be directly proportional.
If users are increasing connections are not increasing then
Cause:
Connection limit reached in web server
No.of Threads limit reached in web server.
Output message in controller for the above cause:
Users permanently shutdown.
Web server log message:
Max client error.
If we are not able to find any issue with the help of Client side statistics move on to
webpage diagnostics.
2) Web page diagnostics analysis:
Using webpage diagnostics we can drill down n/w or server or webpage component level
issues.
Time taken for first buffer(TTFB):
If TTFB is high it is a server or application issue. If TTFB is low and Response times are high then that is a n/w issue.
In webpage diagnostics we have 2 important graphs.
i) Page component break down(PCB)(over time): It will let you know the component level
issues.
ii)Time to first buffer break down(TTFBB)(over time): It will let you know the server or n/w
level issues.
3)Server side statistics:(H/W and O/S)
NOTE: All the windows operating system based servers CPU/Memory utilization should not cross 80%. For all Unix/Linux based operating system servers should not cross 95%.
Windows servers Monitor:
We can monitor windows servers using Task manager. By using Task manager we can
monitor CPU & Memory utilization along with how many processes are running & how much memory utilized by CPU for every process.
Perfmon:
It is a default monitoring tool to monitor windows operating systems based servers.
Start RUNType PerfmonClick ok
Process:
Right click on counter logsNew log settings provide the output file name add servers
& objects along with countersDefine time interval Provide the output file name and
Schedule settings.
Site scope:
It is a online agent less monitoring tool for Windows and Unix/Linux machines. Using site
scope we can monitor unix, linux, AIX boxes etc..
Wily Introscope:
CA (computer associates) wily introscope is a agent based monitoring tool to monitor CPU, Memory , Heap..
Benefits:
With CA Wily Introscope, you can identify and remove bottlenecks, eliminate unplanned
outages, optimize your resources, and lower the costs associated with maintaining complex web applications.
CAWily Introscope lets IT teams and business stakeholders work collaboratively to ensure
that mission-critical web applications successfully meet business and performance goals.
The CA Advantage:
CA Wily Introscope is unique in its ability to monitor the production environment in real
time, 24 x 7. Its instrumentation technology is now the industry standard.
CA Wily Introscope is platform-independent, making it a critical component in the CA
Enterprise IT Management (EITM) vision to unify and simplify IT management across the
enterprise.
How CA Wily Introscope Works:
When a problem occurs, an automatic alert enables IT teams to take immediate action.
Operations or application support personnel can rapidly triage the incident, gather essential data about the nature of the issue, and assign the fix to the right person. Your application performance experts can then run root cause diagnostics to solve the problem quickly —with minimal impact on your IT resources.
You can save all of the CA Wily Introscope historical data using the SmartStor feature. IT and Lines of Business can use this historical data to manage SLAs, plan for future needs, analyze trends and comply with corporate governance initiatives. By improving application performance — executing high-volume transactions reliably and delivering superior response time — you can meet, or even exceed, an application’s business objectives.
DynaTrace :
It is allow you to drill down bottlenecks based on Pure path technology.
Application side monitoring:
We can monitor application side statistics (or) health using wily introscope, Jconsole, JVVM, JMC, Jprofiler & Dyna trace.
Data base Monitoring:
Oracle: If the oracle version is below 10g we can generate DB Stat pack reports.
From Oracle 10g onwards we can generate AWR(Automatic Workload Repository) Reports.
SQL Server: we can create profilers to monitor the SQL server.
Unix servers monitoring:
We can use VM stats command to monitor Unix operating system based servers. Below
tools also you can use to monitor unix based servers.
i)Site scope
ii)wily introscope
iii)Dyna trace.
Q: How to monitor windows/Unix Operating systems using controller?
A: Graph : windows Resources graph
Using windows resources graph we can monitor using all windows operating system based
servers.
Process:
open windows resources graph
click on Add measurementsadd the server name(win7/win 2003) to monitor
Add the counters.
set the schedule settings.
If we are adding any server to monitor your windows resources connect to the console
application Perfmon of the system.
Windows resources will send the Agent to the server which is sitting in that machine(server) to collect the ststistics.
Q: which is the feasible i.e windows resources graph or Perfmon to monitor windows OS
based systems?
A: Perfmon is preferable over windows resources because of Agent overhead on the server.
Quality centre:
QC is a single web based application that supports all essential aspects of Test Management.
It provides a consistent repeatable process for determining releases, cycles, requirements,
execution, and Defect analysis.
Load balancing:
For any kind of web application you may have direct URL (or) Load balancing URL. If it is a
direct URL the request directly hits the web server. Otherwise the request should through
from load balancer.
If your application deployed in cluster environment (multi web and App instances) you may required Load balancer. We have multiple Load balancing Algorithms in market.
IP Spoofing:
IP Spoofing means masking the IP address. Some load balancing algorithms may not able to distribute the load in clustered environment because of Load generator single IP address. If all the users are invoking from same load generator at that time load balancer may consider all the requests are coming from one user. To overcome this load balances issue we have to use IP Spoofing.
Process:
configure multiple IP addresses in DHCP(Dynamic Host Controller Protocol) server.
copy all the IP addresses and ask IT infra guy configure in Load generator.
Interfaces and Batches:
Batch is a self executable file. It will update the data from one table to some other table and one application to some other application.
While running the batch we have to monitor how much resources utilized by application.
Resources consumption while running the batch Time taken for batch execution.
Impact on the GUI application performance.
Process:
1)You have to create huge dat file which contains billions of records.
2)Run the batch.
3)Monitor the system performance while updating the Records.
4)Notify the timestamps at source, middleware and destination servers.
5)report elapsed times, systems performance to the client.
NOTE: Normally we are conducting test using LoadRunner in 2 ways
1) Batch jobs running in background.
2)No batches are running in background.
Performance Centre(PC):
Performance centre is a web based application, which is a web interface of controller.
Using PC we can design, execute, and download the results from anywhere any time. Using
PC you can manage your resources in perfect manner by booking time slots.
NOTE:
You have to buy PC license as well as Controller License.
Versions: 9.1/9.5 and 11.0 (Integrated with ALM)
Activities in Performance centre:
1)User level access
2)Project level access
3)Time slot bookings
4)Test design and Test execution
5)Upload & Download the scripts.
6)Download the results anywhere
Even you can monitor the servers by integrating site scope or other tool.
Advantages:
It is a web based application.
You can monitor the resources in b/w your team members.
Process to connect to the PC :
Launch the PC URL enter credentials choose your project push the scripts into
controller.
OPTIONS:
Status: Shows how many test executions are currently running, upcoming schedule test &
how many recently ran (executed).
Host: Host shows how many LGs, controllers, firewalls connected to the PC.
Timeslots: Here you can book the timeslots for your test by specifying duration of test ,
no.of users , no.of LGs.
NOTE: You have to book extra 15 min to collete the Results.
Vuser scripts: Here you can upload, download, copy the scripts from other project, and also duplicate, view & delete the scripts.
Uploaded there are two ways to upload the scripts:
1) Zip the script folder & upload to PC
2) Vugen->Tools->HP ALM(11.0) Connection (or) PC Connection (based on version)
->Provide the PC URL -> click connect button ->credentials of PC.
Monitoring Profiles: We can monitor the machines by adding profiles.
Auto start viewer: We can book the time slot here we can check it.
It indicates the test schedule to start automatically as per the time frame.
Change project: To change the project use this option.
Load Test:
1)Manage: New Load testDesign RUN
2)General Tab: Load test name, TCP/IP spoofing options.
3)Scheduler: Same as controller design scenarios.
4)Design groups: Load generators.
We can download lrr files after collating the results.
Pacing Calculation:
Q 1: Target 1800 transactions per 1hr
1 Script contain 30 transactions
1 Iteration is taking 30 seconds
What is pacing?
A: Step 1: Calculate the total no.of iterations= target transactions/script transactions
=1800/30
=60 (iterations)
Step 2: Time for target iteration=Target iteration * 1 iteration time
=60*30
=1800 sec
Step 3: Remaining Time= Target time- Target iteration time
=3600-1800
=1800sec
Step 4: Pacing=Reaming time/Target iterations
=1800/60
=30 sec
Q 2: Target 2400 transactions per 1hr
1 Script contain 40 transactions
1 Iteration is taking 30 seconds
What is pacing?
A: Step 1: Calculate the total no.of iterations= target transactions/script transactions
=2400/40
=60 (iterations)
Step 2: Time for target iteration=Target iteration * 1 iteration time
=60*30
=1800 sec
Step 3: Remaining Time= Target time- Target iteration time
=3600-1800
=1800sec
Step 4: Pacing=Reaming time/Target iterations
=1800/60
=30 sec
NOTE: After step 1 reduce 1 iteration from target iterations. Why because last iteration we
may not required any pacing.
Q 3: Target 3000 transactions per 1hr
1 Script contain 50 transactions
1 Iteration is taking 20 seconds
No.of users 10 and duration 1 hr
What is pacing?
A: Step 1: Calculate the total no.of iterations= target transactions/script transactions
=3000/50
=60 (iterations)
Step 1.1: 1 User Iteration=Total iterations/no.of Users
=60/10=6
Step 2: Time for target iteration=(Target iteration-1) * 1 iteration time
=(6-1)*20
=5*20=100 sec
Step 3: Remaining Time= Target time- Target iteration time
=3600-100=3500sec
Step 4: Pacing=Reaming time/Target iterations
=3500/5
=700 sec
Reverse Engineering:
RE=Pacing time + 1 Iteration Time
=700 + 20
=720
=720 * Target Iteration
=720 * 5
=3600 sec (1 hr)
Pacing Formula: Ex: for first problem
R = D – (T * I ) Target iterations=1800/30=60
P = R / I R=3600-(30*60) (or) 3600-(30*(60-1))
R= Remaining time R=3600-1800 (0r) 3600-(30*59)
D= Duration of the test R=1800
T= 1 Iteration Time P=R/I 1800/60
I= Target Iterations P=30 sec
Web click & Script Protocol:
Web click & script protocol records the actions which are performed against the browser
(or) it will record the only browser specific actions. There is no correlation values in vugen
script.
Functions:
1)web_browser(): Performs an action on a browser.
2)web_edit_ field(): Enters data for a text field/ input purpose
3)web_image_submit(): Emulates a user clicking on an image that fires a submit request.
4)web-image_link(): Emulates a user clicking on an image that is a Hyper text link
5)web_list(): Select an item from a list control/Drop down list
6)web_radio_group(): selects one button from a radio button group
Click & Script:
1)Records the browser specific actions
2)Correlation is not required
3)Recommonded for GUI based apps.
4)Records the objects in terms of X.Y co-ordinates
5)Identified some deviations in response times when compared with HTTP Protocol
HTTP/HTML
1)Records the communication b/w client & server.
2)Correlation is required
3)Recommonded for any web apps which is communicating in HTTP Protocol
4) Records the objects in terms of GET & POST Requests
5)It will give accurate Response times.
Record time options:
Recording Modes:
1)GUI Level: It will generate a step for every user actions
2)HTML Level
3)URL Level
Challenges and Enhancements:
while recording your script password will be present in encrypted format, we have to
change to normal format. Ex: set value=jojo; set value= bean
All the clicks will be recording in screen co-ordinates , we have to convert them to action
format.
NOTE: If image co-ordinates are changing causes script failure.
Advantages:
1)Correlation is not required
2)easy to understand & easy to maintain the script
Disadvantages:
1)Response times are slightly different from actual
2)It will generate object for every user action.
Pre requisites (or) Precautions while recording the script:
Which objects (Fields) would like to parameterize those fields should be modify while
recording.
Case study 1:
I have an application which is developed in Java, my business scenario having 10 requests.
Every Jsp page having 100 fields which are filling based on my previous input.
Solution: in the above scenario correlate 100s of values/ fields for every page is a different
process.
To avoid conducting/ implementing correlation I switched from HTTP/HTML protocol to click & script protocol.
Case study 2:
I have an application in that application having multiple tabs. As per the business flow I have to move Tab1 to Tab2 which is not a server call.
Solution: In the above scenario Tab2 action is not a server call.
To perform continue button I have to navigate Tab1 to Tab2 which is not possible in
HTTP/HTML protocol. So I moved to Click & script protocol.
Case study 3:
If the application having GUI interface we can use Click & script protocol.
RTE (Remote Terminal Emulator) Protocol
RTE: If the application developed in Unix environment we have to use RTE Protocol.
Ex: Client server apps and cursor based apps (or) Min frame apps.
Recording Options:
1)Configuration
2)RTE: RTE having two options to handle synchronization. It will generate 2 automatic
functions like:
->Te_wait_cursor()
->Te_wait_text()
Options:
1)Cursor
2)Prompt
Cursor: It instructs the vugen to generate Te_wait_cursor() function to handle
synchronization issue.
Te_wait_cursor() function instructs script execution flow wait for the cursor to be appeared at a specific location in terminal window.
Prompt: It instructs the vugen to generate Te_wait_text() function to handle
synchronization issue.
Te_wait_text() function instructs script execution flow wait for the text to be appeared in a
designated location.
NOTE: Above 2 functions automatically generate based on your record time options. Both
the functions purpose is to handle synchronization.
Advantages: No correlation
Process to record a simple script:
File->New Script->Choose RTE protocol->Start record ->Invokes the terminal
session->choose communication tab->click connect button-> provide session type-> Host name and port number ->OK
Functions:
1)Te_connect(): Connects the terminal emulator to the specified Host.
2)Te_type(): sends a string to the terminal emulator (or) Input purpose.
Ex;Te_type(“Username”):
3)Te_wait_cursor(): Waits for the cursor to appear at a specified location in a terminal
window.
4)Te_wait_text(): Waits for a text string appear at a designated location.
5)Te_wait_sync(): It instructs the vuser to wait until receives a responsefrom server.
6)Te_get_cursor_pos(): Returns the current location of the cursor in the terminal screen.
7)Te_set_cursor_pos(): Sets the position of the cursor on the terminal screen.
8)Te_getvar(): Returns the value of the RTE system variable.
Challenges:
1)Synchronization issue:
Initially we used Record time options(prompt and cursor) to overcome the synchronization
issue. But we fail to run the test in controller because of the synchronization issue.
Solution: We commented all Te_wait_cursor() & Te_wait_text() functions and written
synchronization function called Te_wait_sync().
2)To capture some text from on screen:
Scenario: I have a scenario/situation to capture ASN number which is generated from server and I have to pass the same value in next request.
Solution: Using Te_get_text_line() function captured onscreen text passed it in which
request we required.
3)Error handling:
Solution1: We can use Te_wait_text()/ Te_wait_cursor() functions to overcome /to handle
the Exception pages.
Scenario: Every response should be validated before perform new action. We have to verify whether we receive a correct page or exception page.
Solution: To overcome this issue I developed an external function which will verify whether we received a correct page (or) Error page(or) warning page(or)Invalid page etc…
Citrix_ICA Protocol
Citrix_ICA Protocol: If the application deployed in citrix environment we have to use
citrix_ICA protocol. But my current project deployed in citrix. Before accessing this
application we have to connect to the citrix env. Through citrix protocol.
Steps to Access the application:
1)Access the citrix Env. Through URL
2)Provide credentials & access the application which is published in citrix Env.
3)Perform the business scenario against the application.
4)Log off from the application and from citrix.
Pre requisites:
1)Install citrix_ICA agent in vugen as well as in LG machines(Same version of citrix)
2)Use same resolution (Screen) in vugen as well as in LG machines.
3)Avoid mouse clicks while recording the business scenario.
Functions:
1)ctrx_nfuse_connect(): connects to a citrix server via an NFUSE portal.
2)ctrx_sync_on_window(): waits until a window is created (or) become active.
3)ctrx_mouse_click(): Emulates a mouse click on a citrix client sent to a citrix server.
4)ctrx_wait_for_event(): It is a synchronization function that waits for an event to occur.
5)ctrx_get_window_name(): Retrieves the name of the active window.
6)ctrx_type(): Emulates a typing alpha numeric keys.
7)ctrx_key(): Emulates a non-alpha numeric keys.(Tab,uparrow,dowm arrow…)
8)ctrx_sync_on_bitmap(): waits until a bitmap appears.