Share this page

# Data assignment methods

This section describes the data assignment methods for file-type parameters.

In this topic:

## Data selection

When using file-type parameters, a data file contains the parameter values that are assigned to the Vusers during script execution. You can specify the way in which you assign data from the source to the parameters. The following methods for assigning data are available:

Assignment method | Description
--- | ---
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.
Random | Assigns a value from a random row in the data table every time a new parameter value is requested. When you use Controller to run a Vuser in a scenario, 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.
Unique | Allocates a unique block of parameter values to each Vuser in the scenario, and then sequentially assigns values to the parameter for each Vuser from within the Vuser's block of values. 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. Note: If you are using NV Insights to analyze scenario results, Controller creates several additional Vusers, in addition to the Vusers that you defined in the scenario scheduler. Therefore, if the scenario includes a parameter that is assigned values using the unique data assignment method, make sure that the list of parameter values contains several extra values. This means it has several values more than is required by all Vusers to run all their iterations, in order to accommodate the additional Vusers. If you run out of unique values, VuGen behaves according to the option you select in the When out of values field. For more information, see Parameter Properties dialog box. In Controller, if a script uses Unique file parameterization, running more than one Vuser group with that script in the same scenario may cause unexpected scenario results. For details on the different data assignment and update methods, see Data assignment and update methods.

## Data assignment and update methods

For File type parameters, the Data Assignment method that you select, together with your choice of an 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. It also includes an example of each for a file that has the following values: Kim; David; Michael; Jane; Ron; Alice; Ken; Julie; Fred

Update Method | Sequential Data Assignment Method | Random Data Assignment Method | Unique Data Assignment Method
--- | --- | --- | ---
Each iteration | The Vuser takes the next value from the data table for each iteration. Example: All the Vusers use Kim in the first iteration, David in the second iteration, Michael in the third iteration, and so on. | The Vuser takes a new random value from the data table for each iteration. Example: The Vusers use random values from the table for each iteration. | The Vuser takes a value from the next unique position in the data table for each iteration. Example: 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.
Each occurrence (Data Files only) | The Vuser takes the next value from the data table for each occurrence of the parameter, even if it is within the same iteration. Example: All the Vusers use Kim in the first occurrence, David in the second occurrence, Michael in the third occurrence, and so on. | The Vuser takes a new random value from the data table for each occurrence of the parameter, even if it is within the same iteration. Example: The Vusers use random values for each occurrence of the parameter. | The Vuser takes a new unique value from the data table for each occurrence of the parameter, even if it is within the same iteration. Example: The Vuser uses a unique value from the list for each occurrence of the parameter.
Once | The value assigned in the first iteration is used for all subsequent iterations for each Vuser. Example: All Vusers take Kim for all iterations. | The random value assigned in the first iteration is used for all iterations of that Vuser. Example: All Vusers take the first randomly assigned value for all the iterations. | The unique value assigned in the first iteration is used for all subsequent iterations of the Vuser. Example: The first Vuser takes Kim for all iterations, the second Vuser takes David for all iterations, and so on.

Note: If you select the Sequential method and 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.

## Vuser behavior in Controller

When you set up a scenario to run a parameterized script, you can instruct the Vusers how to act when there are not enough values. The following table summarizes the results of a scenario using the following parameter settings:

- 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.

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: