The types of parameters available in loadrunner VuGen are:
1) File or Table Parameter Types
i) Data Files
ii) Data Tables
ii) Data Tables
2) XML Parameter Types
3) Internal Data Parameter Types
3) Internal Data Parameter Types
i) Date/Time
ii) Group Name,
iii)Iteration Number
iv) Load Generator Name,
v) Random Number
vi) Unique Number
vii) Vuser ID
viii) Date / Time
ii) Group Name,
iii)Iteration Number
iv) Load Generator Name,
v) Random Number
vi) Unique Number
vii) Vuser ID
viii) Date / Time
4) User-Defined Function Parameters
Parameter Types:
- File
- Table
- XML
- Random Number
- Iteration Number
- Unique Number
- Load generator Name
- Date/Time
- Vuser ID
- User-Defined parameter.
The above are the types of parameter files we can use in Load Runner. Let's see in-depth about types.
We can observe while recording a script , a window with some buttons will be displayed.Which contains vuser_init, action,vuser_end. These are the options which are useful for the user at the time of recording script.
File and Table:
These are the most widely used parameter types in the performance testing domain. Vusers take value from the data file and table.
When a file type or table type parameter is used, a .dat file is created. By default all the data files are named as <Parameter Name>.dat and are stored in the script’s directory.
When VuGen opens the data file, it displays the first 100 rows. To view all of the data, click ‘Edit with Notepad’ and view the data in ‘parameter properties’.
XML type parameters:
XML Parameter Types are used for multiple valued data contained in an XML structure. It replaces a complex structure in which an array can be made a part of another array.
The complex structure as required in a web-service call can be replaced with a single XML parameter.
E.g., An XML parameter by the name Contact can replace a name, email id, mobile number, and address.
XML parameterization helps to have cleaner input of the data, and enables efficient parameterization of Vuser scripts. XML parameters are widely used with Web Service scripts and with SOA services.
Random Number:
Random Number replaces the parameter with a random number. While creating random type parameter, a minimum and maximum value of the range (the range, out of which the random number is planned to be selected) is required to be set.
A Random type parameter can be used -
To sample a system’s behavior within a possible range of values. E.g. To randomly view the details of 50 incidents being created in the system, one can specify the range for 50 serial incident ids (e.g., Min – 40001, Max - 40050) and emulate the situation. Randomly incident details will be viewed by Vusers.
Percentage distribution of tasks’ execution by Vusers. Random number can be set to have a range of 100. Using if loop one can achieve appropriate percentage distribution of different tasks.
Iteration Number:
Iteration number parameter type replaces the parameter name with Vuser’s current iteration number.
An iteration type parameter can be used -
To print the Vuser’s iteration number in external file as sometimes required while debugging scripts for data-issues.
To allocate a unique data input per Vuser.
Unique Number:
Unique number parameter replaces the parameter with a unique value. This value is taken from the range set by entering the start value and the size of the range.
Unique number type of parameter is used -
To enter a unique value in the data field while script execution. (E.g. setting a unique username for a Signup transaction of a website).
To check system’s behavior for all possible values of the parameter.
E.g., Executing a query for all employees, whose ID numbers range from 100 through 199, create 100 Vusers and set the start number to 100 and block size to 100.
LoadGenerator Name:
A LoadGenerator is the machine on which Vusers perform the steps as in the scripts. During test execution, Load Generator Name type parameter replaces the parameter with the name of the Vuser script’s load generator.
A LoadGenerator type of parameter is used -
While debugging scripts, to understand if failures exist only at a particular loadgenerator.
To segregate results and logs between different loadgenerators.
Date/Time parameter type:
A Date/time parameter replaces the parameter with a date and/or time. One can specify one’s own format of date/time representation.
Date/time parameter type is used in -
Business scenarios in which vuser wants to get specific details for specific duration of time. In the form data, the ‘from’ field-type will have value of last month’s date-time and the ‘to’ field will have date/time of current date-time.
Scenarios in which vuser has to enter a date-time value.
Scenarios in which vusers have to enter a unique string value for a field.
Vuser Id parameter type:
A Vuser ID replaces the parameter with the ID number assigned to the Vuser by the Controller during a scenario run. When you run a script from VuGen, the Vuser ID is always 1.
Vuser id parameter type is used -
To print the vuser id in an external file for script-debugging purpose.
To segregate transaction volume based on Vuser ids.
User defined parameter type:
A User defined parameter type is a user-defined function in which call to the function is made and the value returned by the function replaces the parameter name.
This type of parameter is used in following cases -
Random function can be called to capture one out of the many co-related values stored in an array (created by web_reg_save_param).
To obtain a value in a specific format that is not supported by other parameter types.