use data set
Use a new row of data from the specified data set.
Name | Description | Type | Modifier |
---|---|---|---|
name | Name of the data set (see ). | String | None |
filter | Filter criteria, or a named filter (see filter built-in action). | String | None |
None
This action may be used within the following project items: test modules and user-defined actions.
Example - Case 1: Dedicated data sets
Action lines
name filter
use data set /Car Rental last name = "Thomas"
 
duration country pickup state pickup city pickup
rent car # duration # country pickup # state pickup # city pickup
 
repeat for data set
Example - Case 2: Inline data sets
Action lines
name
create data set Rented Cars
 
  duration country pickup state pickup city pickup last name
row 3 Canada British Columbia Kamloops Allen
row 1 United States Texas Houston Thomas
row 2 United States Florida Brossard Thomas
row 5 United States California San Diego Baker
row 4 Canada Manitoba Dauphin Thomas
 
end create data set
 
name filter
use data set Rented Cars last name = "Thomas"
 
duration country pickup state pickup city pickup
rent car # duration # country pickup # state pickup # city pickup
 
repeat for data set
- The data set argument may specify a dedicated data set or inline data set that has already been defined within the test.
- for a dedicated data set: the full TA path from the Data node must be specified, with forward slashes (/) delimiting each level of the hierarchy.
- for an inline data set: only the name (no path) of the data set is necessary.
- This action establishes a loop which is terminated by a matching repeat for data set action.
- Within a loop, each execution of this action causes it to populate variables with data from the next sequential row of the data set, (or, if a filter is in effect, the next sequential row of filtered data.
- The variables populated by this action have names corresponding to the column headers of the rows of the data set.
- As a convenience, you can enter a use data set action into a test module by dragging a data set node from the TestArchitect explorer tree to a cell of the first column of the editor. The use data set action is automatically inserted where you release your mouse button, with the data set path and name inserted into the name argument. (Note that the path is relative to the project’s Data node, so that a data set directly under it will be preceded in the editor by a single slash (/)). Also, because every use data set begins a loop that must have a closing action, a complementary repeat for data set action is auto-inserted several lines below.