Value from a Set Generator

Applies to LoadComplete 4.97, last modified on May 20, 2019

The Value from a Set generator is used to generate arbitrary values. For this purpose, the generator takes values from a list of custom values. Using this generator type you can populate a list variable with values from the specified list and then use this data in your tests.

To activate the Value from a Set generator, do the following:

  • In the Generate Values dialog, select Value from a Set from the Data Generator list.

  • Activate any user-defined generator based on the Value from a Set standard generator as it is described above.

Parameters

After you have selected the Value from a Set generator, you are offered to specify some additional parameters for the generated data. The parameters are:

Custom values

Specifies the list containing the values that will be used to generate data. By default, this list is empty. To add a new custom value, click Add and then specify the desired value. To load the desired values from a text file, click Load Values from File and select the desired file in the ensuing Open File dialog.

To load values from a file, the file must contain one value per line.
If the Custom values list is not empty and you click the Load Values from File button, the existing values will be replaced with the values loaded from the file.

To delete a value, select it in the Custom Values list and then click Remove. To delete all the custom values from the list, click Clear All. To change the value order, use the Move Up and Move Down buttons.

Generation mode

Contains a drop-down list that allows you to specify generation modes. The available modes are:

  • Random - Select this mode to generate a random collection of values that are specified in the Custom Values list.

  • Sequential - Default. Select this mode to generate a sequence of values that are specified in the Custom Values list. In this case, the values will written in the same order they are presented in the list.

Duplicate each value … time(s)

Specifies how many times each generated value will be duplicated. The default value of the parameter is False.

After you specify the needed parameters, you can obtain the sample values that have been generated by the engine. The values are displayed in the Sample field.

Also, you can discard all the changes you made in the generator’s parameters and restore the parameters set by default. For this purpose, click Set Default Values below the Sample field.

If you are going to use the same settings in several variables or if you configure one generator in the same manner from time to time, it is much easier to save the selected generator with the specified parameter values as a user-defined generator. For this purpose, click the Save to User-Defined button below the Sample field.

For more information on generating test data, see Using Data Generators.

See Also

Data Generators Reference
Custom String Generator
Using Data Generators
Generating Values
List Variables

Highlight search results