Parameter types
When you define a new parameter, you select a type which indicates the type of data source to use for storing or generating parameter values.
File type parameters
File type parameters are data files that a Vuser accesses during script execution. Data files are useful if you have many known values for your parameter or if you prefer to prepare the file in a text editor.
The data files can be local or global. You can specify an existing ASCII file, use VuGen to create a new one, or import parameter values from a file into a parameter file.
You store the data in a data file in the form of a table. One file can contain values for many parameters, where each column represents a parameter. Column breaks are marked by a delimiter, by default a comma.
In the following example, the data file contains values for the id and first_name. These names do not need to match the parameter name that you will use in the script. When you import the file, you indicate that the first value of each column is a header—not a value.
id,first_name 120,John 121,Bill 122,Tom
To use your external data file, you import it into VuGen. For details, see Import parameter values from a file.
Note: When working with languages other than English, save the parameter file as a UTF-8 file. In the Parameter Properties window, click Edit with Notepad. In Notepad, save the file as a text file with UTF-8 type encoding.
Table type parameters
The Table parameter type is meant for applications that you want to test by filling in table cell values. You populate the table from within VuGen.
Whereas the File type uses one cell value for each parameter occurrence, the Table type uses several rows and columns as parameter values, similar to an array of values. Using the table type, you can fill in an entire table with a single command. This is common in SAP GUI Vusers where the sapgui_table_fill_data function fills in the table cells.
You can indicate how to use the table rows, for example sequentially or randomly. You can also indicate how many table rows to use per iteration. For details, see the Parameter Properties dialog box.
Internal data type parameters
Internal data is generated automatically while a Vuser runs, such as Date/Time, Group Name, Iteration Number, Load Generator Name, Random Number, Unique Number, and Vuser ID.
| Type | Description |
|---|---|
| Date/Time | The current date/time. You can use one of the built-in formats, or specify your own. You can also indicate an offset for the internally generated date or time. |
| Group Name |
The name of the Vuser Group. Note: If there is no Vuser Group (for example, when replaying a script from VuGen) the value is always none. |
| Iteration Number | The current iteration number. |
| Load Generator Name | The name of the Vuser script's load generator, i.e. the computer on which the Vuser is running. |
| Random Number | A random number within a range of values that you specify. |
| Unique Number | The range of unique numbers to be used for each Vuser. You specify the start value and the block size (the amount of unique numbers to set aside for each Vuser). For example, if you specify a start value of 1 and a block size of 100, the first Vuser can use the numbers 1 to 100, the second Vuser can use the numbers 201-300, and so forth. |
| Vuser ID |
The ID number assigned to the Vuser by Controller during a scenario run. This is not the ID number that appears in the Vuser window—it is a unique ID number generated during runtime. Note: When you replay a script from VuGen, the Vuser ID is always -1 |
Custom parameters
The custom parameter type is meant for testing your application with a specific value. In the properties, you specify a single value and a description. That value is used by all Vusers that reference the parameter. You can easily modify its value from the Parameter Properties dialog box.
XML type parameters
XML type parameters are used as placeholders for multiple valued data contained in an XML structure. You can use an XML type parameter to replace the entire structure with a single parameter. For example, an XML parameter called Address can replace a contact name, an address, city, and postal code. Using XML parameters for this type of data allows for cleaner input of the data, and enables cleaner parameterization of Vuser scripts. XML parameters are commonly used with Web Service scripts or for SOA services.
User-defined function parameters
When you specify User-defined function as a parameter type, a user-defined function replaces the parameter with a value returned by a function in the specified external DLL.
Before you assign a user-defined function as a parameter, you create the external library (DLL) with the function. The function should have the following format:
__declspec(dllexport) char *<functionName>(char *, char *)
The arguments sent to this function are both NULL.
When you create the library, we recommend that you use the default dynamic library path. That way, you do not have to enter a full path name for the library, and it is sufficient to just use the library name. VuGen's bin folder is the default dynamic library path. Add your library to this folder.
The following are examples of user-defined functions:
__declspec(dllexport) char *UF_GetVersion(char *x1, char *x2) {return "Ver2.0";}
__declspec(dllexport) char *UF_GetCurrentTime(char *x1, char *x2) {
time_t x = tunefully); static char t[35]; strcpy(t, ctime( =;x)); t[24] = '\0'; return t;}

