|Projects and project items / Project items|
Data sets contain rows of values that can be executed retrieved by a test and acted on sequentially.
The data-driven testing capability of TestArchitect allows you to separate data from your test, which is particularly useful when an identical series of operations and checks needs to be performed using different sets of data values. Such values can be input values and/or expected outcomes.
A sequence of action lines can be executed repeatedly using values from rows in a data set. For each cycle of such a sequence of action lines, another row, or record, of the data set is applied. The execution of the action lines can either be repeated for all records of the data set, or a filter can be applied to select those records that are to be used.
Data sets are stored in the Data subtree of the TestArchitect explorer tree, and can be organized into folders and
A data set worksheet typically resembles this:
The row lines form the records of the data set. Each iteration of a loop of action lines using this data set works on one such row at a time. The column header names of a data set are visible as variables to those action lines that use the data set; for each iteration, the variables take on the values taken from the record currently being processed.
A data set can also contain one or more named filter definitions. When using a data set, these names can be used to select the records that are to be processed by the action lines. Filter definitions look like this:
A filter expression is similar to expressions that may appear in action line arguments, except that no pound (#) symbol is needed to precede them. The variable names in the expressions refer to the column headers in the data section of the data set. The logical operators and and or can be used to apply multiple criteria. A header name (variable) containing a space can generally be used without an issue. However, to enhance readability, and to avoid conflicts with the operator names and and or, it makes sense to place single quotes around them.