|
When using values from a file, VuGen lets you specify the way in which you assign data from the source to the parameters. The following methods are available:
- Sequential: Assigns data to a Vuser sequentially. As a running Vuser accesses the data table, it takes the next available row of data. If there are not enough values in the data table, VuGen returns to the first
value in the table, continuing in a loop until the end of the test.
- Examples: Assume that your table/file has "Kim; David; Michael; Jane; Ron; Alice; Ken; Julie; Fred" values
- If you specify update on Each iteration, all the Vusers use Kim in the first iteration, David in the second iteration, Michael in the third iteration, and so on.
- If you specify update on Each occurrence, all the Vusers use Kim in the first occurrence, David in the second occurrence, Michael in the third occurrence, and so on.
- If you specify update Once, all Vusers take Kim for all iterations.
- Random: Assigns a random value from the data table every time a new parameter value is requested. When running a scenario in LoadRunner, or a script in HP Business Process Monitor, you can specify a seed number for random sequencing. Each seed value represents one sequence of random values used for test execution. Whenever you use this seed value, the same sequence of values is assigned to the Vusers in the scenario. You enable this option if you discover a
problem in the test execution and want to repeat the test using the same sequence of random values.
- If you specify update on Each iteration, the Vusers use random values from the table for each iteration.
- If you specify update on Each occurrence, the Vusers use random values for each occurrence of the parameter.
- If you specify update Once, all Vusers take the first randomly assigned value for all the iterations.
- Unique: Assigns a unique sequential value to the parameter for each Vuser. Ensure that there is enough data in the table for all Vusers and their iterations. If you have 20 Vusers and you want to perform 5 iterations, your table must
contain at least 100 unique values. If you run out of unique values, VuGen behaves according to the option you select in the When out of values field.
- If you specify update on Each iteration, for a test run of 3 iterations, the first Vuser takes Kim in the first iteration, David in the second, and Michael in the third. The second Vuser takes Jane, Ron, and Alice. The
third Vuser, Ken, Julie, and Fred.
- If you specify update on Each occurrence, then the Vuser uses a unique value from the list for each occurrence of the parameter.
- If you specify update Once, the first Vuser takes Kim for all iterations, the second Vuser takes David for all iterations, and so on.
Data Assignment and Update Methods for File/Table/XML Parameters
For File, Table, and XML type parameters, the Data Assignment method that you select, together with your choice of Update method, affect the values that the Vusers use to substitute parameters during the scenario run.
The Data Assignment method is determined by the Select next row field, and the Update method is determined by the Update value on field. The following table summarizes the values that Vusers use depending on
which Data Assignment and Update properties you selected:
- Data Assignment
- Each iteration:
- Each occurrence:
- Onces:
- Update Methods
- Select next row = Unique
- Update Value on = Each iteration
- When out of values = Continue with last value
Situation |
Duration |
Resulting Action |
More iterations
than values |
Run until
completion |
When the unique values are finished, each
Vuser continues with the last value, but a
warning message is sent to the log indicating
that the values are no longer unique. |
More Vusers
than values |
Run
indefinitely
or Run for … |
Vusers take all of the unique values until they
are finished. Then the test issues an error
message Error: Insufficient records for param
<param_name> in table to provide the Vuser
with unique data. To avoid this, change the
When out of values option in the Parameter
properties or the Select next row method in
the Parameter properties. |
One of two
parameters are
out of values |
Run
indefinitely
or Run for … |
The parameter that ran out of values,
continues in a cyclic manner until the values
of the second parameter are no longer unique. |
To Create an XML Parameter from a Web Service Call:
- Select the root element of the complex data structure. The right pane displays the argument’s details.

- Select XML in the right pane, and click the ABC icon. The Select or Create Parameter dialog box opens.

- In the Parameter name box, enter a name for the parameter.
- In the Parameter type box, select XML if it is not already selected.
- Click Properties to assign a value set now, or OK to close the dialog box and assign values later.
| |