Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Configuration Guide
Document Release Date: June 2012 Software Release Date: June 2012
Legal Notices
Warranty The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Restricted Rights Legend Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. Copyright Notices 1994 - 2012 Mercury Interactive (Israel) Ltd., All rights reserved Trademark Notices Java is a US trademark of Sun Microsystems, Inc. Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. Oracle is a registered US trademark of Oracle Corporation, Redwood City, California. UNIX is a registered trademark of The Open Group.
Documentation Updates
The title page of this document contains the following identifying information: Software Version number, which indicates the software version. Document Release Date, which changes each time the document is updated. Software Release Date, which indicates the release date of this version of the software.
To check for recent updates, or to verify that you are using the most recent edition of a document, go to: http://h20230.www2.hp.com/selfsolve/manuals This site requires that you register for an HP Passport and sign-in. To register for an HP Passport ID, go to: http://h20229.www2.hp.com/passport-registration.html Or click the New users - please register link on the HP Passport login page. You will also receive updated or new editions if you subscribe to the appropriate product support service. Contact your HP sales representative for details.
Support
Visit the HP Software Support web site at: http://www.hp.com/go/hpsoftwaresupport This web site provides contact information and details about the products, services, and support that HP Software offers. HP Software online support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the support web site to: Search for knowledge documents of interest Submit and track support cases and enhancement requests Download software patches Manage support contracts Look up HP support contacts Review information about available services Enter into discussions with other software customers Research and register for software training
Most of the support areas require that you register as an HP Passport user and sign in. Many also require a support contract. To register for an HP Passport ID, go to: http://h20229.www2.hp.com/passport-registration.html To find more information about access levels, go to: http://h20230.www2.hp.com/new_access_levels.jsp
Table of Contents
Chapter 1: Configuration Reference.....................................................7 Chapter 2: Using HP Performance Validation SDK Configuration Builder9 The Protocol Information Dialog........................................................11 The Template Files Dialog ...................................................................12 The Additional Settings Dialog ...........................................................12 The API Functions Dialog....................................................................13 The Supported Platforms Dialog .........................................................16 The Run-time Settings Dialog .............................................................16 The Recording Methods Dialog...........................................................17 The Code Generation Dialog ..............................................................20 The Recording and Regeneration Dialog ............................................21 The Recording Settings Dialog ............................................................22 The Summary ......................................................................................23 Chapter 3: Configuration Files ............................................................25 The Template Folder............................................................................26 Header Files .........................................................................................27 Script Settings: The USR File................................................................28 Permitted Function Calls: The ASL File...............................................28 Runtime Environment Settings: The MDRV Data File .......................29 Step Display: The Steps Data File ........................................................30 IntelliSense: The RuntimesCpp.h File .................................................33 Highlighting: The VLX File .................................................................35 Protocol Configuration: The LRP File .................................................36 Protocol-Specific User Settings ............................................................49 Appendix A: Glossary ..........................................................................59
Table of Contents
1
Configuration Reference
This includes configuration information you can use for the setup of the protocol. This section includes the following chapters:
This chapter describes: Using HP Performance Validation SDK Configuration Builder Configuration Files
On page: 9 25
2
Using HP Performance Validation SDK Configuration Builder
The HP Performance Validation SDK Configuration Builder enables setting the commonly-used fields in the configuration files without your having to edit the files directly. When the builder is first run, it creates the required configuration files. Each time the builder is run subsequent to the first run, it creates new files based on its internal memory of the settings entered at the last run and on settings entered at this run. That means that any edits in the files are lost. If you have edited the file outside the configuration builder, save a copy of the configuration files and merge the changes after running the configuration builder. For header files only, each time a file is overwritten, the last version is saved with a number appended to the file name. For example, when <ProtocolID>.h is overwritten the second time the builder is run, the previous version is saved as <Protocol ID>_1.h. You can use these backup files to restore edits to the header files using a merge tool or text editor. A file to be added to the protocol is selected in the configuration builder by entering the full path to the current location of the file. When the settings are saved, the selected files are copied from the path entered to the appropriate location in the protocol development tree. The next time a configuration tab is viewed, the file name is displayed without a path. The original file still exists, but has no further connection to the protocol under development. Changes made to the original do not affect the protocol. To view the location of the protocol files in the development tree, use the summary screen. See The Summary on page 23.
This chapter describes the tabs of the HP Performance Validation SDK Configuration Builder. For a description of the actual configuration files modified by the HP Performance Validation SDK Configuration Builder (and other configuration files as well), see Configuration Files on page 25. On the tool bar and menu bar of the HP Performance Validation SDK Configuration Builder, you can create a new project, open an existing project, save the settings entered, run tools, and get help. To open an existing project, select File -> Open. In the Location field, enter or browse to the folder that contains the protocol projectsfor example, C:\Program Files\HP\Performance Validation SDK\Protocols Root. In the Protocol Name field, enter the name of the sub-folder that contains the specific protocol to configurefor example, EchoHooking. When the protocol is ready for testing or distribution, you can prepare an installation package with the HP Performance Validation SDK Installation Builder. To run the installation builder, select Tools -> Run Installation Builder from the menu bar. For more details, see About the Installation Builder on page 191. This chapter includes:
The Protocol Information Dialog on page 11 The Template Files Dialog on page 12 The Additional Settings Dialog on page 12 The API Functions Dialog on page 13 The Supported Platforms Dialog on page 16 The Run-time Settings Dialog on page 16 The Recording Methods Dialog on page 17 The Code Generation Dialog on page 20 The Recording and Regeneration Dialog on page 21 The Recording Settings Dialog on page 22 The Summary on page 23
10
A free text description of what the protocol does. The protocol name to display in the user interface. The path to the protocols parent folder. The bitmap to be used with the protocol in the user interface. The bitmap is a 16x16 BMP file. On first use, the full path file name of the source file is entered. When OK is clicked to save the configuration, the file is copied to the correct location in the protocol installation tree. After the configuration is saved, only the file name is displayed.
Protocol ID
The identifier to be used in communication with LoadRunner. The ID is no more than eight characters long. The absolute path to the protocol root installation folder. Any string can be used. The recommended convention is X.Y where X is the major release and Y is the minor release (or patch number).
11
Add a file to the list. When clicked, a new line with a browse symbol (...) is added to the list. Browse to the file to add. Delete the selected file from the list.
Protocol-specific files that must be added to the template for scripts created using this protocol can also be added directly to the template folder as described under The Template Folder.
12
GUI Element
Protocol Help
On first use, the full path file name of the protocol help file. After the configuration is saved, the file name only. On first use, the full file path and name of the protocol API reference. After the configuration is saved, the file name only. On first use, the full path file name of the protocol resource file. After the configuration is saved, the file name only.
Function Reference
Resource File
Display the The API Function Form to add a new function definition. Delete the selected item.
13
GUI Element
Add a new function definition by copying the selected method prototype. Prototype API Functions area Replay DLL The list of prototypes. The full path name of the DLL for Load Runner to use to invoke the protocols functions.
14
The name of the argument to be displayed in dialogs and lists. Indicates whether the argument is optional. Indicates if the button that displays the Select or Create Parameter dialog is shown with the argument when adding a new step. Check this option to indicate to the user that the argument is likely to require parameterization. Note that all string input arguments can be parameterized. This feature only guides the user.
Possible Values
A semi-colon delimited list of possible values for the argument. If this field is empty, the user can enter any value. For example: YES;NO;NextVersion;TBD. The name of the argument as it is written in the step.
Script Name
15
16
Add a file to the list. When clicked, a new line with a browse symbol (...) is added to the list. Browse to the file to add. Delete the selected file from the list.
17
Network Recording Level Use x Recording Use Custom C API Hooking TLB File Name
Enables the controls for selection of Socket Based Recording, HTTP Based Recording, or WEB Based Recording. Select one of the recording levels. Indicates that the protocol implements hook functions. On first use, the full file path and name of the type library in which the protocol API functions are defined is entered. When OK is clicked to save the configuration, the file is copied to the correct location in the protocol installation tree. After the configuration is saved, only the file name is displayed. The list of matching DLLs. The Recorded DLL contains the source functions and the Custom Hook DII contains the protocol hook function. Mapped Functions is the number of source-hook function pairs in the two DLLs.
18
19
Description Enter the full file path and name of the application DLL that contains the source functions. After the configuration is saved, the path is stored internally by the configuration builder and only the file name is displayed. On first use, the full path file name of the protocol DLL that contains the hook functions is entered. When OK is clicked to save the configuration, the file is copied to the correct location in the protocol installation tree. After the configuration is saved, only the file name is displayed. The list of source-hook function pairs in the two DLLs. Record is the source function. Hook is the protocol function.
Hook DLL
Mappings area
20
GUI Element
Display the Filter Definition Form to enter or edit the details of the filter. Move the selected filter up in the list. The order in the list determines the order in which the filters are run. Move the selected filter down in the list. The order in the list determines the order in which the filters are run. Custom Filters area The list of filters and, for each filter, the name of the DLL containing the filter.
21
Adds a new line to the list. Double-click the new line or click the edit button to enter the file data. Delete the selected item.
The edit button displays the Record and Regeneration Settings Files dialog. On this dialog, use the browse button to select the XML and INI files. Recording Settings area Regeneration Settings area The list of pairs of custom tab configuration XML files and the INI files in which the selected recording options are stored. The list of pairs of custom tab configuration XML files and the INI files in which the selected regeneration options are stored.
22
Description The DLL containing the pre-recording check function. The DLL containing the post-recording check function.
The Summary
The summary displays the directory and file tree that will be created when you save the settings. This display reflects the settings entered on the other dialogs.
23
24
3
Configuration Files
This chapter includes information on the configuration files and the settings in the files. To set the commonly used configuration fields in the configuration files, you can use the HP Performance Validation SDK Configuration Builder, described in Using HP Performance Validation SDK Configuration Builder on page 9.
Note: If configuration files that are created by the HP Performance Validation SDK Configuration Builder are edited outside the configuration builder and the configuration builder is run subsequently, the edits are overwritten. If you edited a configuration file, save a copy before running the builder and merge your edits back into the files after you close the builder.
The Template Folder on page 26 Header Files on page 27 Script Settings: The USR File on page 28 Permitted Function Calls: The ASL File on page 28 Runtime Environment Settings: The MDRV Data File on page 29 Step Display: The Steps Data File on page 30 IntelliSense: The RuntimesCpp.h File on page 33 Highlighting: The VLX File on page 35
25
Protocol Configuration: The LRP File on page 36 Protocol-Specific User Settings on page 49
vuser_init.c Action.c vuser_end.c <protocol ID>.usr globals.h default.usp default.cfg The template folder may also include other files that are required by your protocol for each Vuser script. If your protocol includes additional template files, specify them using the HP Performance Validation SDK Configuration Builder. For more information, see The Template Files Dialog on page 12 and Script Settings: The USR File on page 28. The C files are the initial script actions files added to a new script. default.usp is the default run logic. globals.h contains the include statement for this protocols header and sometimes other declarations. The run-time settings configuration file, default.cfg, contains the default run-time settings. Most sections represent a tab on the Run-Time Settings dialog box. There is a protocol-specific section whose key is the protocol ID, for example, [MyProtocol]. It contains protocol-specific defaults for settings common to more than one protocol, and settings only used by this protocol and their defaults. All run-time settings, common or protocol-specific, used by the protocol must have default values specified in the protocol-specific section. For more information, see Run-time Settings on page 49.
26
The <Protocol ID>.usr file contains the initial configuration for a new script. For more information, see Script Settings: The USR File on page 28. When the protocol is used in a single-protocol script, the initial files are taken from this folder. When the protocol is used in a multi-protocol script, some files are taken from the multi-protocol template. For example, comments you write in the protocol default Action.c are not visible in a multi-protocol script because the action files are taken from the multiprotocol template. Configuration files, like the USR and CFG files, are merged so that the first time a key is encountered in any file of the same extension (USR or CFG), its value is used. Subsequent occurrences of the key are ignored. Therefore, you cannot rely on the default settings for the protocol being used in a multiprotocol script. In default.cfg, this problem is overcome with respect to the protocol, and mitigated with respect to related protocols, by entering default values in a section named with the protocol ID. For example:
[myReplay] SampleRTSArgument=5
Header Files
The principal protocol header file is <LoadRunner installation>\include\<protocol ID>.h. This file has #include directives for other headers required for the protocol steps. There is also a <LoadRunner installation>\template\<protocol ID>\globals.h file, which has an #include directive for the <protocol ID>.h file and the lrun.h file. The lrun.h file declares the VuGen infrastructure functions, like the lr_start_transaction. For multi-protocol scripts, the globals.h files of all the protocols are merged to a single globals.h file. Since this process does not preserve all #include directives, the list of included files is also entered in the ExtIncludeFiles parameter of the MDRV data file (See Runtime Environment Settings: The MDRV Data File on page 29.)
27
The settings in the ASL file can be disabled without altering the file. It is recommended that this be done only during development. See SecurityMode on page 29.
28
29
For protocols created with the HP Performance Validation SDK, it is strongly recommended that the value be 1. CAPTION CLASSNAME For display. A string of format Stepn_class in the range Step1_class, Step2_class, ..., Step13_class. n is the number of items in the parameter list of the function signature. Indicates whether the symbol for a variable-length argument list (...) is displayed in dialogs. 1=displayed, 0=not displayed.
HAS_ELLIPSIS
30
Description Indicates whether to display or hide the Insert Parameter button for an argument in the insert and edit step dialogs. The argument position is indicated with letters A to M, indicating arguments from the first (A) to the thirteenth (M). There is no need to enter more parameter items than there are arguments.
A value of 1 indicates that the button is displayed, not
that it is hidden.
A value of 0 indicates that the button is not displayed.
Note: String positional arguments and all the values of named arguments in protocols created using the HP Performance Validation SDK can be parameterized. Therefore, this parameter only effects the display. Set the value to 1 to encourage the end user to consider using a parameter for this argument. ICONID RETVAL_TYPE PARAM_TYPE_A ( _B, _C, ..., M) The identifier of the icon for this method in the resource file. The icon is a 16x16 bitmap (BMP file). The return type, one of: void, char, int, long, or LPCSTR. The type of data expected in argument n, from A to M, indicating arguments from the first (A) to the thirteenth (M). It is not necessary to enter more PARAM-TYPEs than there are arguments. Possible values are T_CHAR, T_GENERAL, T_INT, T_PASSWORD, T_STR, and T_XML. In the case of named arguments, PARAM_TYPE indicates to LoadRunner how to interpret the string argumentfor example, for a named argument "CustomerAge=30", the PARAM_TYPE is T_INT.
31
Description Short descriptions of argument n, from 1 (A) to 13 (M). There is no need to enter more text parameter items than there are arguments. The following characters can also be specified:
;
This is a combo field. Valid values are the strings that follow the ; .
*
Optional.
^
A snapshot.
$
Read-only. VISIBALESTEPNAM E The name used to invoke the function, generally the same as the function declaration.
32
33
Choices of argument values from a list can be indicated with a bit-wise OR marker, for example, "ClearBuffer=Yes|No". Passing exactly one argument from a list can also be indicated with a bitwise OR marker, for example, "UserName="|"UserID=". Passing at least one argument from a list can be indicated with a logical OR marker between optional arguments, for example, ["LDAPUser="] || ["LocalUser="]. Where one argument is required only if another is specified, they are enclosed together in optional argument brackets, for example ["OpenComment=<value>", "CloseComment=<value>"]. As noted, additional notation options should be used sparingly, with careful consideration of whether the additional information justifies the lessreadable format. For named arguments where no additional notations are used, this file is most simply maintained with the HP Performance Validation SDK Configuration Builder. See The API Functions Dialog on page 13. For positional arguments, the file must be maintained with a text editor. If this file is edited outside the HP Performance Validation SDK Configuration Builder and the configuration builder is run subsequently, the edits are overwritten. To preserve changes made in any way other than with the configuration builder, make a copy before running the configuration builder. After the run, merge the changes you wish to preserve back to the file.
34
Important: With the exception of userkeywords, the parameters in this file must be consistent with the programming languages used by the protocol.
35
Important: Do not edit sdkbase.lrp. To apply values different from those specified in sdkbase.lrp, override the value in the protocol LRP file.
The Protocol Section, described on page 37 The Replay Section, described on page 37 The Replay Section, described on page 37 The Vugen Section, described on page 40 The API Section, described on page 44 The Filters Sections, described on page 44 Miscellaneous Sections, described on page 44
36
CommonName DerivedFrom
Description DontSupportGroup
EnableAutoTranPerFu nc
Hidden Icon
MaxThreadPerProcess
37
Description Indicates whether to enable (1) or disable (0) the protocol as a multi-protocol Vuser type. The protocol name. Use the same string entered for the ProtocolID parameter. The callback function for notification on a save operation. After a save operation, the specified function in the specified DLL is invoked. The format is PostSaveNotify=<function_name>:<dll_name>. For example: PostSaveNotify=PostSaveNotify:DotNetRecordUtils.dll
PostRecordingNotify
The function name and DLL of the callback to be invoked when a recording session is completed. The function name is required to be PostRecordingCallback, but the DLL is specific to the protocol. For example: PostRecordingNotify=PostRecordingCallback:SDKProtoc ol.dll
ProtocolId
A string of up to eight characters that follows the rules for C language variable names. It is used internally by VuGen to identify the protocol. The function name and DLL of the callback to be invoked before starting a recording session. The function name is required to be PreRecordingCallback, but the DLL is specific to the protocol. For example: PreRecordingCheck=PreRecordingCallback:SDKProtoco l.dll
PreRecordingCheck
ResultsDirUI
Enables (1) or disables (0) the Prompt for results directory check box in the Tools->Options dialog. Set to 1 if the Test Results Report is implemented and used.
38
Description The folder containing resources for use on dynamic tree tabs, relative to the <LoadRunner installation>\dat directory. Always use folder bitmaps. For example: RTS_DynamicTreeBmpDir_1=bitmaps
A comma-delimited list of directories in the script directory tree to copy to the load generators. All the directories files and sub-directories are copied. For example: RunTimeExtraDir=solution,data\SerializedObjects
RunTimeExtraFileExt
Defines which file types are copied from the controller to the load generators to run the script. For example: RunTimeExtraFileExt=*.pem,*.der,*.xml,*.config
The version of the HP Performance Validation SDK on which this version of the protocol was developed. Indicates whether to enable (1) or disable (0) the protocol as a single Vuser type. The version of this protocol. Set to 1 if the Test Results Report is implemented and used. For protocols created with the SDK, set this value to 1. The names of the test run processes for the platforms supported by the protocol. The process is mmdrv.exe for all Windows platforms and mrdv.exe for all UNIX platforms.
39
REG_DynamicTreeInitXml File_n (REG_DynamicTreeInitXm lFile_1 REG_DynamicTreeInitXml File_2 ... REG_DynamicTreeInitXml File_n) See also, REG_DynamicTreeOutIni File_n on page 175. REG_DynamicTreeOutIniF ile_n (REG_DynamicTreeOutIni File_1 REG_DynamicTreeOutIniF ile_2 ... REG_DynamicTreeOutIniF ile_n) See also, REG_DynamicTreeInitX mlFile_n on page 175.
Specifies the XML presentation configuration file for a dynamic tree tab. The user enters configuration data in the tab for use in generating a script using this protocol. The first tab is File_1, the second tab is File_2 and so on. See Protocol-Specific User Settings on page 49 For example: REG_DynamicTreeInitXmlFile_1=file1_reg. xml REG_DynamicTreeInitXmlFile_2=file2_reg. xml The files in which the values specified in the corresponding code regeneration options tab are saved. For example, if there is a custom tab defined: REG_DynamicTreeInitXmlFile_1=my_reg.x ml The data from the tab is saved in: REG_DynamicTreeOutIniFile_1=my_user_ reg_cfg.ini The developer writes the initial values in these files and the configuration builder overwrites the initial values with the users selections. The default values in the REG_DynamicTreeInitXmlFile file are for display only. The values at record time are taken from this file.
40
Name
Description
RO_DynamicTreeInitXmlF ile_n (RO_DynamicTreeInitXml File_1 RO_DynamicTreeInitXmlF ile_2 ... RO_DynamicTreeInitXmlF ile_n) See also, RO_DynamicTreeOutIniF ile_n on page 174. RO_DynamicTreeOutIniFil e_n (RO_DynamicTreeOutIniFi le_1 RO_DynamicTreeOutIniFil e_2 ... RO_DynamicTreeOutIniFil e_n) See also, RO_DynamicTreeInitXml File_n on page 176.
Specifies the XML presentation configuration file for a dynamic tree tab. The user enters recording options in the tab for use in recording a session that uses this protocol. The first tab is File_1, the second tab is File_2 and so on. See Protocol-Specific User Settings on page 49 For example: RO_DynamicTreeInitXmlFile_1=my_reg_cf g.xml RO_DynamicTreeInitXmlFile_2.xml=my_ot her_reg_cfg.xml The files in which the values specified in the corresponding recording options tab are saved. For example, if there is a custom tab defined: RO_DynamicTreeInitXmlFile_1=my_ro.xml, The data from the tab is saved in: RO_DynamicTreeOutIniFile_1=my_user_ro _cfg.ini The developer writes the initial values in these files and the configuration builder overwrites the initial values with the users selections. The default values in the RO_DynamicTreeInitXmlFile file are for display only. The values at record time are taken from this file.
Recordi ng options
41
Name
Description
RTS_DynamicTreeInitXml File_n (RTS_DynamicTreeInitXml File_1 RTS_DynamicTreeInitXml File_2 RTS_DynamicTreeInitXml File_n) See also, RO_DynamicTreeOutIniF ile_n on page 174 AllowScriptEdit
Specifies the XML presentation configuration file for a dynamic tree tab. The user enters configuration data in the tab for use in running a test that uses this protocol. The first tab is File_1, the second tab is File_2 and so on. See Protocol-Specific User Settings on page 49 For example: RTS_DynamicTreeInitXmlFile_1=citrix_rts. xml RTS_DynamicTreeInitXmlFile_2=citrix_rts_ 2.xml Enable (1) editing of the script. (Default = 1)
General
EnableThreads
Enables (1) or disables (0) the "Run Vuser as a thread" check box in the Run Time Settings dialog. Comma-delimited list of the languages supported for this protocol. For protocols created with the HP Performance Validation SDK, only C is supported. For example: LangSupported=C (Default = C)
General
LangSupported
General
When defining multiple tabs for a file in the Output window, set values for the tab name, file, tab icon and tab ID settings. For example:
; Multi Code Generation Log Mulit_OutputTabName1="Generation Log" Mulit_OutputTabFile1=data\CodeGenerationLog.txt Mulit_OutputTabIcon1="5" Mulit_OutputID1="33088"
General
42
Name
Description
OutputTabFile#
The path and name of the file whose contents are displayed in the corresponding tab in the Output window. # is the index number for the tab. For example, to display the Generation Log in the first tab of the output window: OutputTabFile1=data\CodeGenerationLog.t xt
OutputTabName#
The name for a tab in the Output window, where # is the index number for the tab. For example, to create a tab for the Generation Log: OutputTabName1=Generation Log
General
Platform executables
The names of the run-time environment executable files for supported platforms. For example: AIX=mdrv HPUX=mdrv LINUX=mdrv SOLARIS=mdrv WIN2000=mmdrv.exe WINNT=mmdrv.exe WINXP=mmdrv.exe
General
RecordingLogFile
The name of the log file for recording. The default is RecordingLog.txt. For example: RecordingLogFile=data\RecordingLog.txt
General
43
Name
Description
SupportMultipleAction
TemplateDir
The name of template directory. It must be identical to the protocol ID. For example: TemplateDir=Oracle_NCA
General
44
45
Name
Description
name
The name of the filter. The name must be unique in the protocol. The DLL that contains the implementation of the filter. This DLL must be located in the <LoadRunner>\bin directory The initialization function name. LoadRunner calls this function once before passing any recorded event to the filter. The default name of the init_func is <filter_name>_init_func.
dll
init_func
cleanup_func
The last method called when the filter is finished. A comma-separated list of protocol IDs. Events marked with these IDs are sent to the filter. It is strongly recommended that filters for new protocols handle only the events belonging to their protocol. If no protocol ID is specified, the filter is called for all protocols. System events have a protocol ID of zero (0). They are sent to all filters.
protocols
after
The ID of a filter after which this filter is inserted in the filtering chain. Either "before" or "after" must be used, but not both. For possible values, see Before and After Values on page 47.
46
Name
Description
cleanup_func
The clean up function name. LoadRunner calls this function once after all events have been processed. The filter sends any remaining events as required by the protocol logic, and releases any allocated memory. The default name of the cleanup_func is <filter_name>_cleanup_func.
before
The ID of a filter before which this filter is inserted in the filtering chain. Either "before" or "after" must be used, but not both. For possible values, see Before and After Values on page 47.
Miscellaneous Sections
The CustomTlbs Section
This section contains the TLBs key. The key is the list of type libraries that contain record-time events definitions for the protocol. Several TLBs can be registered on the same line using a comma or semicolon as a delimiter. For example:
47
[CustomTlbs] TLBs=LoadRunnerMyProto.tlb, LoadRunnerMyProtoExtra.tlb For more information, see Declaring Event Types on page 98
48
49
The name of the output INI file is entered in the configuration builder with the name of the custom tab files. The protocol developer creates the INI fines and populates them with the initial values. Each time the configuration is set by the user in VuGen, the output INI file is overwritten with the values the user selects. The following are some of the attributes that are common to many elements:
Common Attribute Label Section Description The text to display next to the control. The section of the default.cfg file into which to write the item. For protocol-specific settings, ensure the section is uniquefor example, <Protocol_ID>_<Section name>. The item key in the CFG file, and the name by which the item is identified in code. The help ID of the page in the protocol general documentation CHM file that describes this element. The value of this attribute is the ID of the CHM page minus 131,072 (Ox20000). For example, if the ID of the page in the CHM is 131,073, then the HelpID attribute of the element in the tab definition XML file is 1. The ID of the CHM page may not be less than 131,072. The HelpId attribute is most commonly used in the root element. Hint1 Hint2 Default The Default is optional. The title for context-sensitive help. The context-sensitive help text. The control is initialized to display this selection.
Key HelpId
50
Description Enable or disable child elements of CheckBox and Radio elements that contain other elements. Possible values are: Uncheckall. When the user clears (unchecks) the parent, the child elements are automatically cleared. Disableall. When the user clears the parent, the child elements are disabled without changing the value. For example, a child element that was checked when the parent was cleared, remains checked and cannot be cleared. Checkall. When the user selects the parent, the child elements are automatically checked.
Val%d
The list of strings for a string selection control (val1, val2, ..., valn). For example. Label="Window Size" default="800 x 600" val1="640 x 480" val2="800 x 600" val3="1024 x 768" val4="1280 x 1024" val5="1600 x 1200"
51
STATIC
Static text. Usually used to start a new subject with a hierarchical list of element.
CHECKBOX
52
Element COMBOBOX
Description A list of strings of which one can be selected. The user cannot enter values that are not in the list.
Valid Attributes Label, Section, Key, Hint1, Hint2 Val%d: The list of strings: val1, val2,...,valn. Default: If the default is one of the values, that value is selected when the control is first displayed. If Default is not specified, the first list element is selected. If the default is a string that is not in the list, the string is displayed when the tab is initialized but it is not selectable. Below is an example of a default that serves as a prompt, but is not selectable: <Choose a frequency> Label, Section, Key, Hint1, Hint2 Val%d: The list of strings: val1, val2,...,valn. Default: If the default is one of the values, that value is selected when the control is first displayed. If Default is not specified, the first list element is selected. If the default is a string that is not in the list, the string is displayed when the tab is initialized but it is not selectable. Below is an example of a default that serves as a prompt, but is not selectable: <Choose a frequency> Label, Section, Key, Hint1, Hint2, Default (Optional).
COMBOBOX_ EDIT
A list of strings. The user can either select from the list or enter a value not in the list.
EDIT_TEXT
53
Element EDIT_PASS
Description A password control in which the user enters free text. The value is encrypted when saved. Use the decryption functions to use the data in the protocol. Add an edit control that accepts only integers.
EDIT_NUM_IN T
Label, Section, Key, Hint1, Hint2, MinVal, MaxVal: Default: Numeric text (Optional). Label, Section, Key, MinVal, MaxVal, Hint1, Hint2 Default: Numeric text (Optional). Label, Hint1, Hint2, SubTreeStatus (Optional) Section: Use the same value for all Radio elements in a set. Key: Use the same value for all Radio elements in a set. KeyVal: The value of the Key if this button is checked. It must be unique for each Radio element with the same Key. Default: One element in the set must be set with Default="1".
EDIT_NUM_FL OAT
Add a edit control that accepts only numbers. The number can include a decimal point. A control that is set or cleared by clicking on it. A set of radio buttons is defined by using the same Section and Key attributes for each of the controls. When a radio button is selected, all others in the set are cleared automatically. A radio button element can contain other elements and can enable and disable them using the SubTreeStatus. Therefore, a set of radio buttons can be used to enable one group of several groups of options.
RADIO
FOLDER_DLG
Label, Section, Key, Hint1 Default: Either a message to the user or a default folder. (Optional).
54
Element FILE_DLG
Description A control used to select a file. It is an edit control with a browse button.
Valid Attributes Label, Section, Key, Hint1, Hint2 FileFilter: A filter for file extensions. For example: Setup files (*.exe)|*.exe|All Files (*.*)|*.*|| Default: Either a message to the user or a default folder. (Optional). Label, Section, Key, Hint1, Hint2, SecFormat: Set to 1 to convert a date from dd/mm/yy to the number of seconds since Jan. 1, 1970 UTC. The conversion is performed when the value is saved. (Optional) Default: If no Default is specified, the default value is 0 (zero), indicating today.
DATE_DLG
A control used to select a date. It is an edit control with a date-helper button. The field accepts either a string of format dd/mm/yy or the delta from today (integer)for example, 0 is today, 7 is a week from today, and so on.
55
56
57
58
A
Glossary
Term Definition
argument
(See also: positional argument, named argument, parameter)
A value passed to a function or an item in a function parameter list. The term argument is preferred to the term parameter in most HP Software documentation for both formal parameters and actual parameters. This convention avoids confusion where the product makes special use of the term parameter. 1. A function implemented by a protocol to be used in test steps. 2. A function exposed by the application. As used in this guide, the application is the item on which you perform load testing. It can be a single server-based application, a set of applications having a common invocation point, or any other item that uses a communications network to reply to requests, up to an entire server farm. During a test run, the application receives requests from, and responds to, a load generator that is emulating users of the applications client.
API function
application
Another term for application. The Windows application that exercises the server application. Recording with API hooking traps communication between the client and the application being tested.
59
Appendix A Glossary
Term
Definition
code generation
The iterative process of abstracting higher level information from lower level information, and results in a test script. Code generation starts with recorded events and ends with events that correspond to an output to the script or log. The events are then written to the output. See also: filter. Code generation starts automatically at the end of a recording session. See also, regeneration.
event
A data structure that stores information to be used in code generation. Events may represent activities of the client application and server, comments, log entries, C code, and others. Events are either recorded or are a product of a filter. A software component that processes events by combining or abstracting data from input events and outputting new, higher-level events. Filters are used in code generation. A function implemented by the protocol that is invoked in place of the applications recorded function during a recording session. The client side of the test run. The load generators run the test by sending requests to the application as required by the test script and processing the responses. The LoadRunner run-time test execution component.
filter
hook function
load generator
mdrv
60
Appendix A Glossary
Term
Definition
named argument
(See also: positional argument, argument)
Named function parameters are implemented in VuGen as a string containing a key-value pair. For example, in this call, all arguments except the first (the step name) and the LAST marker are named arguments: web_url("Open xyz home page.", "URL=http://www.xyz.com/", "TargetBrowser=HP Technologies", "RecContentType=text/html", "Mode=HTML", LAST); The prototype for this function is: int web_url(const char * mpszStepName, ...);
parameter
A variable in a script that is managed by LoadRunner. A parameter is not declared in the script as, for example, a C language variable is declared. Parameters are sometimes created at design time. In general, these parameters get the run-time value from a table or from a function. Examples of such functions are a random number generator or iteration counter. Other parameters are output arguments of test steps, created during test run to store values from the server response. As an input argument, a parameter is a marker consisting of the parameter name in brackets. The form of brackets is configurable, but is generally curly brackets {} or angle brackets <>. For example, the call to web_reg_save_param("outFlightVal", ...); causes output parameter outFlightVal to be created and a value assigned after the next action that leads to a response from the server. The parameter can then be used as an input argument: "Value={outFlightVal}".
61
Appendix A Glossary
Term
Definition
positional argument
(See also: argument, named argument)
An item in the parameter list of a function whose meaning is fixed by its position in the list. For example, this function has two positional arguments: int lr_param_increment (const char *destination_param, const char *source_param); A set of DLLs, resources, and configuration files to be used by LoadRunner to test a given type or types of application. For example, the FTP protocol is used to test FTP server applications. A special case is the utilities protocol (sometimes called lr functions) that provides LoadRunner services to other protocols. A source function that is recorded using a hook function during a recording session. The activity during which a VuGen user performs a series of actions that constitute a business process on a client application of the application being tested, while VuGen traps the communication between the client and the application. A code generation run initiated by the user. Regeneration is initiated by the user and runs the same process on the same data as code generation. However, depending on the protocol implementation, regeneration and code generation may be configured differently. An API of the application to be tested. A call in a test script to a function defined by a protocol (API function) or, less commonly, a call to an external program from a test script. In this guide, a test step is a call to an API function unless specified otherwise. The LoadRunner component that performs socketlevel recording for all protocols that require socketlevel events.
protocol
regeneration
WPLUS
62
Appendix A Glossary
63
Appendix A Glossary
64