use data set

Use a new row of data from the specified data set.
NameDescriptionTypeModifier
name

Name of the data set (see ).

StringNone
filter

Filter criteria, or a named filter (see filter built-in action).

StringNone
None
This action may be used within the following project items: test modules and user-defined actions.
The following settings are applicable to this action: remove double quotes from cells.
Example - Case 1: Dedicated data sets
Action lines
        
        	name	filter		
use data set	/Car Rental	last name = "Thomas"		
&nbsp				
	duration	country pickup	state pickup	city pickup
rent car	# duration	# country pickup	# state pickup	# city pickup
&nbsp				
repeat for data set				
        
    
Example - Case 2: Inline data sets
Action lines
        
        	name				
create data set	Rented Cars				
&nbsp					
&nbsp	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
&nbsp					
end create data set					
&nbsp					
	name	filter			
use data set	Rented Cars	last name = "Thomas"			
&nbsp					
	duration	country pickup	state pickup	city pickup	
rent car	# duration	# country pickup	# state pickup	# city pickup	
&nbsp					
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.

Copyright © 2023 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(800) 322-0333