Using data sets

Data sets are used to provide values for a sequence of action lines. To start such a sequence from within a test, use the use data set action.

The use data set action has two arguments:

  1. The name argument of the data set must contain the path of the data set, with the forward slash (/) as the path separator. This path always starts with the forward slash (/), which corresponds to the Data subfolder of the project.
    • Example
      • A data set, CRR, is located directly under the Data node, without folders. The path is: /CRR
      • A data set, zipcodes, is located in the folder address data under the Data node. The path is: /address data/zipcodes.
  2. The filter argument can contain either a filter expression, or the name of a filter that has been defined (or will be defined) in the data set.

Tip: 
In any of the arguments of the action lines following use data set (up until the first repeat for data set action), you can use an expression with variables whose names are equivalent to the column headers of the data set. These variables are automatically declared within the scope of the use data set / repeat for data set block.

At the end of the sequence of action lines, use the action repeat for data set. During the test run, this action causes execution to loop back to the use data set line for as long as there are more vectors from the data set available to be used.

The following example demonstrates how a data set can be used to enter a series of reservations for rental cars. In this example, the various steps in the registration process are followed for each vector supplied from the data set. In this case the values are only used as input, but a data set can also contain expected values, for comparison with actual results.

To apply the long filter (a filter named long, as specified in the data set from the earlier example), place it as a value in the filter argument of use data set. Now only those vectors matching this filter’s criteria are used for the test.

Instead of using a filter by name, as defined in the data set file, you can also specify a filter expression directly within the filter argument.


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400