![]() ![]() ![]() ![]() |
| Topics this page: |
|
|
This script overcomes several specific limitations in the LoadRunner product: | Solution |
---|---|
| ![]() |
| ![]() and Display |
| ![]() |
| ![]() |
| ![]() Services Diagnostic Stats. |
| ![]() Logic |
| ![]() Driven Control Data Run Logic |
| ![]() Execution |
| ![]() Time Boxing |
| ![]() Driven Logic |
This framework makes irrelevant several limitations to using the advanced Eclipse IDE to edit and compile LoadRunner scripts, because the framework handles run-time and parameter settings from a spreadsheet read by the framework.
The Eclipse platform also cannot step through LoadRunner scripts as they execute. But the framework also makes that mostly irrelevant because the framework enables stop points and changes to verbosity to be specified between any individual action.
| ![]() ![]() |
| ![]() ![]() |
| ![]() ![]() |
| ![]() ![]() |
|
Object | Captured into Parameter |
---|---|
Page Title | {pageTitle_...} |
Redirected URL | {pRedirectedURL_...} |
Character Set ("iso-8859-1", "UTF-8") | {pRetCharset} |
Response Header | {pResponseHeaders} |
Response Body | {pResponseBody} |
Response Header and Body | {pResponseFile} |
These are in addition to the response time and bytes downloaded from each request.
If no web_... function is defined between startTrans() and endTrans(),
LoadRunner issues an error message about "web_reg_param" not used.
So in such a case, instead of startTrans() and endTrans(), code this function:
wi_stubTrans();
Additionally, the wi_endTrans() functions will make a request to the Diagnostic web service if the "ProbeShow" attribute is set to "Y".
| ![]() ![]() |
| Key ratios DBAs use to manage Oracle are calculated by this framework:
These ratios depend on having SiteScope edited to report:
consistent gets
SiteScope should also be edited to report
| ![]() ![]() |
|
Minimum | Average | Median | Maximum | 90% | Std.Dev. |
---|
(The median is not shown by the Controller Run tab because that can only be calculated after all values are available at the end of the run.)
The trouble with these common statistical measures is that they do not reflect
the standard specified in SLA (Service Level Agreements), which have definitions of
unacceptable response time such as "4 seconds 90% of the time (including WAN traffic time)".
The "90%" reported by LoadRunner is calculated from response times collected throughout the entiraty of a particular run. LoadRunner does not report whether transactions met its performance criteria at various times as loads vary throughout a run.
These shortcommings are resolved by a customer-oriented statistic recently developed by the apdex alliance created and led by Peter Sevcik of NetForecat.
LoadRunner does not calculate this because it's so new. But this framework does calculate it and report it as a user-defined metric.
The apdex (application performance index) reflects the ratio of measurements over a period of time that meet (or nearly meet) performance thresholds. I say "nearly meet" because Apdex gives "half credit" to individual response time measurements that is between two performance standards:
Beyond this point, measurements are not counted as part of the index.
On graphs, excellent performance numbers are shown higher than unacceptable performance numbers.
Because the apdex is geared toward production performance monitoring, which yields stats
summarized by day, week, month, the
Apdex specification v1.1 considers sample sizes of 100 per index value normal.
It asks that smaller sample sizes be marked with an asterisk.
|
|| | Time Stamp | || | Transaction | || | Type | || | Seconds | || | Response KB | || | KB/Sec | || | X | || | XKB | || | Note | || |
| | 070304071113S0GNoneU-1 I2A1D3T1S1 | | | img/au.gif | | | image/gif | | | 0.617 | | | 1.406 | | | 2.3 | | | 1.4X | | | 1.0 | | | - | | |
For convenience, the elapsed time and amount of data captured from returning transactions is expressed in seconds and KiloBytes rather than the milliseconds and individual bytes. "KB" is 1024 bytes.
The "KB/Sec" column provides a rough calculation for a general estimation. This is of course way low becuase it includes server processing time plus transmission time.
The "X" column is the number of times the actual bytes returned versus the expected number of bytes specified in the Driver Bytes column. For example:
The "XKB" column reports the bytes expected after convertion to KiloBytes.
"Y" in the OutputCsvLog attribute will allow the output of comma separate values
in a ".csv" (comma separated) file for import into Excel
This is done after every driver control record is processed, whether it was success or not.
|
1.requested "Think" time before transaction requests | 6.lr_ start trans | - | 5.Actual response time | - | 7.lr_ end trans | 10."Wait" time to fulfill remainder of TimeBox seconds. | ||||
2.pause BetweenTriesSecs from previous retry (if any) | 3.pre-trans framework "overhead" Time | 4.lr_ think time | 8.Wasted start time | - | 9.Wasted end time | 11.System monitoring "probe" time (if any) | 12. lr_think time |
If a transaction takes longer than the time box time, an error message is issued and time is taken away from the next transaction's wait time. This is an attempt to keep the intended schedule by "making up" for the extra time. An excessive number of these errors of course means that the time boxes should be longer.
Time boxing behaviour is on by default. To disenable it, add a "TimeBox" run-time attribute with a value of "N".
This is time the script waits if the server does not repond.
A value of "defaults" sets the timeouts to 120 seconds.
A value of "min" sets the timeouts to 10 seconds.
This script overrides these settings to the value of TimeBox Wait seconds to avoid creating time outs.
| ![]() ![]() |
This sample script is driven by a parameter (.csv or .dat) file.
Its columns are aligned vertically
when openned from within Excel
|
U | V | TT | Rand | Trans | Think | Act | Timebox | Node | Info1 | Info2 | Info3 | Bytes | Tries | Note | Seq |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ParmSet | Version_PubID | 1826102 | 1 | ||||||||||||
Y | 01_URL | URL | http://dev... | Hello | 12342 | 2 | |||||||||
N | 01_URL | URL | http://pe... | Sometimes | 12342 | 3 | 3 | ||||||||
02_Login | Login | 6 | me | password1 | 36823 | 4 | |||||||||
Y | 95 | Home | Custom | Spec | a21.htm | Cool | 56342 | X 2 | frames | 2 | |||||
else | Abandon | 5 | |||||||||||||
70 | 99_Logout | 2 | Logout | Logout | 36213 | 6 |
U,V,TT,Rand,Trans,Think,Act,Timebox,Node,Info1,Info2,Info3,Bytes,Tries,Seq Y,,,100,,,ParmSet,Version_PubID,1826102,,,,1 Y,,,100,,,VarSet,OutputResponseFile,Y,,,1 Y,,,100,Login,0,Login,http://127.0.1.1:5001/webapp1/,myself@somewhere.com,Pa$$word12,,,2 Y,,,70,,3,Logout,,,,3
Whenever the Action script encounters any value other than NULL or "Y" in the first column,
that row is skipped and processing continues to the next row.
This value is limited to 1 character.
|
Think Time Category | Italian Tempo (bpm) | Description | Casual User Seconds | Expert User Seconds |
---|---|---|---|---|
FASTEST | PRESTO (168-200 bpm) | Clicking a visible menu item. | 2-3-4 | 1-1.5-2 |
FAST | ALLEGRO (120-168 bpm) | Viewing a page and selecting a drop-down item | 5 to 8 | 2 to 4 |
MEDIUM | MODERATO (108-120 bpm) | Filling out a data entry screen with 2 to 3 fields. | 7 to 12 | 3 to 6 |
SLOW | ANDANTE walking pace (76-108 bpm) | Filling out a data entry screen with 4 to 5 fields. | 10 to 14 | 5 to 7 |
SLOWER | ADAGIO ("at ease") (66-76 bpm) | Filling out a data entry screen with 6 to 9 fields. | 14 to 20 | 7 to 10 |
SLOWEST | LENTO LARGO (40-60 bpm) | Filling out a data entry screen with 10 to 13 fields. | 21 to 25 | 7 to 10 |
To add the same amount of think time before every transaction, in Run-Time Settings Additional Attribute add a framework attribute "ThinkSecs" or add a line specifying "AttrSet" in the Action column, "ThinkSecs" in the Node column. The time specified is added to time in Think columns in DriverParms.
To ignore all these settings during a run, specify a value of "N" (any value other than "Y") for attribute "ThinkBefore".
For additional accuracy, overhead "wasted" time that the framework needs to perform internal processing before each transaction (such as reading driver parameters and writing out log header records) are automatically calculated and included as part of think time (if any).
The framework recognizes several act keywords:
Parmset stores a LoadRunner parameter named in Node with a value in Info1.
This is a tremendously helpful feature because now you can define and instantiate static application-specific
parameters very quickly and without cluttering up the Parameter GUI with single-row parameter files.
ParmShow displays the LoadRunner parameter named in Node. The confirmation message:
INFO: ParmShow of Version_PubID=1826102
AttrSet stores a new value for a pre-defined run-time attribute.
VarSet stores a C variable named in Node with a value in Info1. The app_init function recognizes valid variable names and issues an error if one is not recognized. Unlike parameters, globle variables need to be coded into vuser_init.c.
Braces in the Info1 value "{lrname}" stores that LoadRunner parameter name.
Total with Node value of "start" begins a running total of seconds and bytes returned.
Total with Node value of "end" causes the running totals to be stored in
the wiki log.
URL causes a "text/html; file to be retrieved from the address specified in the Node column.
CSS causes a "text/css" file to be retrieved from the address specified in the Node column.
JS causes a "text/javascript" file to be retrieved from the address specified in the Node column.
BMP causes a "image/bmp" file to be retrieved from the address specified in the Node column.
GIF causes a "image/gif" file to be retrieved from the address specified in the Node column.
PNG causes a "image/png" file to be retrieved from the address specified in the Node column.
These are all processed as sub transactions.
Application-specific acts are added as additional LoadRunner Action script files
referenced from framework function wi_app_act_modules().
Examples of these include:
if( strlen( lr_eval_string("{pDriverInfo1}") ) == ZERO ){ ... it has information ... }
This value is limited to 256 characters.
"Y" in the CompareBytes run-time attribute will add comparisons of the bytes returned as a multiple of the expected bytes defined in this field.
The MaxBytesDiff run-time attribute is used as the threshold of bytes difference before issuing an error message.
This column is also used to specify repeatition. "x 2" (an X with a space and a number) specifies the number of times that the request is repeated.
"end" in the Seq column of the last request designates the ending record number, which does not include the header row. This number of records read can be prematurely limited by defining a DriverRecs attribute.
Separating program control data from script code provides you an option to reuse
4)
keyword files controlling functional tests
| ![]() ![]() |
| ![]() ![]() |
| ![]() ![]() |
| ![]() ![]() |
|
Functionality | In wi_lib.c | Application-specific Functions in wi_app.c |
---|---|---|
Initialize variables during vuser_init phase | wi_vuser_init_vars() wi_attr_set() | wi_app_init() wi_app_var_set() |
Initialize variables during each Action iteration | wi_action_Keyword_loop(), wi_action_init() | wi_app_action_iteration_init() |
Close files and cleanup at end of run | wi_vuser_end() | - |
Process Driver parameter requests | wi_process_driver_ext_rec() and wi_process_driver_attr_rec() within
wi_process_driver_tries() within wi_process_driver_rec() within wi_action_Keyword_loop() | wi_app_act_modules() |
control of transactions | wi_stubTrans() wi_assemble_CurrentTrans() wi_startTrans() wi_startTransName() wi_endTrans() wi_startSubTrans() wi_endSubTrans() wi_startTotal() wi_endTotal() | - |
printing of messages | wi_startPrinting() wi_stopPrinting() wi_printMessage() wi_print_DriverRec_details() | - |
evaluation of responses | wi_startScreen() wi_evalScreen() wi_PrintHttpStats() wi_endScreen() wi_clearScreenInfo() catchResponseToFile() wi_saveImgToFile() wi_replaceCharSeparators() | wi_app_startScreen() wi_app_evalScreen() wi_app_evalScreenTitle() |
output of logs | wi_CsvLogOpen() wi_CsvLogClose() wi_WikiLogOpen() wi_WikiLogClose(), wi_CsvLogHeaderWrite() wi_WikiLogHeaderWrite() wi_CsvLogRowWrite() wi_WikiLogRowWrite() | - |
Diagnostics | wi_SvcDiag_init() wi_SvcDiag_request() | - |
Virtual Table Server | wi_vts_init() wi_vts_request() | - |
Note that the names of functions in the script all begin with the name of the action file where they reside.
Functions return values using static variables LR_PASS, LR_FAIL, UNKNOWN.
|
Defined in... | Run-time Attribute | Description | Default | Source Marker | Max Chars |
---|---|---|---|---|---|
wi_app.c | EnvID | A number associated with each particular value of the {pURLHostPath} parameter that includes the protocol (http/https), IP/DNS name, port, and folder of the targeted environment. | 1 | {21} | 4 |
ScriptType | "Keyword" for using the DriverParms.csv file, "KeepAlive", "DiagLoo" for only diagnostics. | Keyword | {22} | 16 | |
CleanUpFirst | "Y" to invoke data clean-up during vuser_init phase, if defined. | "N" | {29} | 1 | |
CleanUpAfter | "Y" to invoke data clean-up during vuser_end phase, if defined. | "N" | {30} | 1 | |
wi_lib.c | Verbosity | A code which specifies the extent of detail appearing in logs. | 4 | {4} | 1 |
TimeBox | "Y" uses the "Tries" column of each transaction control file as the number of seconds that all transaction will take every time (for a controlled processing rate). Vusers are main to wait after each transaction until this time passes. | "N" | {5} | 1 | |
TimeBoxSecs | The number of seconds that all transaction will take every time (for a controlled processing rate). Vusers wait after each transaction until this time passes. Non-negative numbers in the Driver "Timebox" column override this number. | Y | {5} | 1 | |
Randomly | "Y" to use the "Rand" column value to determine whether. | Y | {10} | 1 | |
RandTries | "Y" resets the randomizer for each try repeating a driver row. | "N" | {10} | 1 | |
ProcessPct | "100" to process every row of the control parms, "0" to never process that row. | 100 | {10} | 4 | |
TaskType | A value such as "LT" would skip all non-blank rows which do not contain that value. | blank | {10} | 16 | |
ThinkBefore | "Y" to add think time before transactions. If a Think value is not specified in the driver row, the ThinkSecs attribute value is used. | "Y" | {10} | 1 | |
ThinkSecs | Number of seconds to pause every transaction before invoking the request. This is overriden by specifications in the "Think" column. This can contain a decimal (such as "3.2"). | 0 | {12} | 8 | |
ThinkTimeRandomRange | The percent that think times defined in the driver Think column can be randomized. "50"(%) means that a 10 second think time can range between 5 seconds and 15 seconds. A range of 100 percent means a range between no seconds and double the think time specified. A zero range (the default) means no randomization and the think time as specified is used. | 0 | {12} | 4 | |
TransNamePrefix | Text to pre-pend to the transaction name specified in the "Trans" driver parameter column. | blank | {11} | 8 | |
TransNameSuffix | Text to append to the transaction name specified in the "Trans" driver parameter column. | blank | {11} | 8 | |
CompareBytes | "Y" compares the number of bytes returned as a multiple of the bytes expected. | "N" | {13} | 8 | |
MaxBytesDiff | The maximum difference in the number of bytes returned vs. the bytes expected before an error message is issued. | 300 | {13} | 8 | |
OutputCsvLog | "Y" to write out a csv log for each transaction. Any other value will not. | "N" | {15} | 1 | |
OutputWikiLog | "Y" to write out a txt file containing wiki markup. | "N" | {15} | 1 | |
ShowSubTrans | "N" to not report sub transaction results (only transaction summary and total results). | "Y" | {15} | 1 | |
OutputInfoToWiki | "Y" to write out "info" messages to the Wiki log. | Y | {15} | 1 | |
OutputLogFolder | Blank defaults to C:\\Documents and Settings\\userid\\Local Settings\\Temp | "N" | {15} | 1 | |
OutputHeaders | "Y" to display HTTP Header Response returned from server. | "N" | {16} | 1 | |
OutputBody | "Y" to display HTML Body Response returned from server. | "N" | {16} | 1 | |
ClientTimeout | Rather than "defaults" of 120 seconds. "min" for 10 second minimums during script debugging; "max" for 1000 second maximums during load tests. | min | {17} | 8 | |
BetweenTriesSecs | The number of seconds to wait between retries. Cannot be a negative number. This can be a decimal number (e.g., 3.2) ranther than a whole integer (such as 3). | 0 | {17} | 8 | |
ClearCookies | "Y" to clear cookies before each iteration, any other value to not do that. | "N" | {18} | 1 | |
SiteScope | "Y" to collect SiteScope statistics. | "N" | {19} | 1 | |
BetweenMonSecs | The number of seconds between SiteScope requests, to avoid overrunning the server under test. | 60 | {19} | long | |
ProbeSecs | The number of seconds between probe requests, to avoid overrunning the server under test. | 60 | {19} | long | |
KeepGoing | "Y" ignores errors and continues processing. | "N" | {19} | 1 | |
ProbeShow | "Y" displays web services Diagnostics statistics in user-defined points on vuser_init, vuser_end, and after each iteration. | "N" | {19} | 1 | |
ProbeName | IP address or computer name. | localhost | {19} | 256 | |
ProbeHost | IP address or computer name. | localhost | {19} | 256 | |
ProbePort | Port used for Dignostics server. | 35000 | {19} | 16 | |
ProbeUserName | User Name for Diagnostics server. | admin | {19} | 32 | |
ProbePassword | Password for Diagnostics server. | admin | {19} | 32 | |
ProcessWithinInit | "Y" processes DriverParms during initialization (vuser_init). Entries in the "TT" (Task Type) column are used to distinguish whether each request is executed during init or during the regular Action section. | "N" | {23} | 1 | |
ActionLoops | This achieves the same result as setting the Run Logic repetitions for the Action action. | 1 | {24} | 4 | |
GetURLOnly | "Y" causes LR to make web requests with "MODE=HTTP" (which does not retrieve resources) that works if the script code was recorded in "URL mode" is edited to recognize this. The default, "N", make web requests with "MODE=HTML". | "N" | {25} | 1 | |
GetExtras | "Y" to get EXTRARES extra resources requested from within javascript. "N" saves time during script debugging. | Y | {26} | 1 | |
DriverRecStart | The starting row. | 1 | {27} | 4 | |
DriverRecs | The number of control parameter file records in the DriverParms.csv file. This is automatically updated to the actual record number when value "end" is encountered in the "Seq" column. | 9999 | {27} | 4 | |
LineupInit | Activate Rendevous point. | "N" | {31} | 1 |
|
{pURLHostPath} | The front portion of the URL that is common to all requests of the application, the part usually mass replaced with the parameter after a recording. Typically it contains the protocol, Host, and folder, such as: "https://www.yahoo.com/finance/". |
{pIteration} | |
{SSMMHH} | Time stamp. |
This script displays with each message and output log entry a unique identifier to each request: 060211015432S0GNoneU-1I1.1-1R3 This identifier includes a timestamp. The first part of this is used to name log files:
The second part of this is used to identify processing sequence:
| ![]() ![]() |
| ![]() ![]() |
| ![]() ![]() |
Related Topics:
Performance Testing
NT Perfmon / UNIX rstatd Counters
Mercury LoadRunner
Mercury Virtual Table Server (VTS)
Mercury WinRunner
Rational Robot
Free Training!
Tech Support
![]()
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page ![]() Thank you! |