Sets and ranges
Both test data table cells and stub data table cells can contain sets and ranges. When you use sets and ranges as test input, you can generate multiple, individual tests from a single data set. In this case, the number of individual tests is determined by multiplying every possible combination in set or range A by every possible combination in set or range B.
As a result, it is important to use sets and ranges wisely and not create an unmanageable number of individual tests that would take a long time to run.
Sets
A set is shown in a data table by curly braces ({ }) and by as many comma-separated values as required to define the set. Each object in the set must be a valid object of the type defined by the row. (You can also include subtypes or implementing objects.) Each value in the set can also be a constant or an expression. Sets can be defined for the input, output, and return values of test data tables, and for the input values of stub data tables.
Ranges
A range is shown in a data table by comma-separated values enclosed within square brackets ([ ]). Each value in the range must be or evaluate to a primitive, numerical data type supported by the test language.
Two kinds of ranges are allowed. The first kind is used to generate values from a minimum to a maximum boundary. This type of range contains three comma-separated values. The first value is the starting value of the range, the second value is the ending value of the range, and the last value is the increment. Both the starting and ending values are inclusive. This type of range is available in the In column of test data tables.
Thus, if you define a range of [-10, 10, 5], the starting value is -10, the ending value is 10, and the increment is 5. In this case, the following test values are generated:
[-10, -5, 0, 5, 10 ]
The other kind of range is used to check if a value falls within the boundaries of the range's minimum and maximum values. This type of range only contains two comma-separated values and does not include an increment value. This type of range is only available in the output column of test data tables and the input column of stub data tables.
Related tasks
Defining sets
Defining ranges