Description

A Test Data Query imports column data from a CSV file and can be performed in one of two ways: 

  • CSV List - From a CSV file, pull rows of data having one or more columns, into memory as a list of data.  
  • CSV Index - From a CSV file, pull rows of data having one or more columns, into memory and retreive any row via its row index.  

A Test Data Query configuration has the following primary components: 

  • Parameters - Define the resource path, subdirectory, name, and variables for the Test Data Query.
  • Import - CSV file to be imported for the Test Data Query.
  • Domain Attributes - Defines the Attributes that will be populated by the real data obtained from the imported file.


Note: An Organization Variable Set may be also be selected and used with a Test Data Query. 


Step 1: Configure Test Data Query Parameters

Test Data Query Parameters define any resources and variables to be used during the query.  Available parameters within the Parameters Pane will vary based on the type of query.


CSV List

Items with an asterisk (*) are required to perform this type of Test Data Query.

  • path* - Defines the path where the CSV file is located.
  • subDir - Defines an optional subdirectory under the resourcePath where the CSV file exists.
  • fileName* - Defines the name of CSV file located on the user's computer.
  • dilimiter* - Defines what delimiter is used to separate column data within the CSV file.
  • bufferSize* - Defines how many rows to keep in memory at once from the CSV in order to avoid the memory out of exception. Defaults to 1000.
  • setLoop* - setLoop gives you the ability to OVERRIDE the loop count at the Scenario level and ONLY produce the number of rows that are defined in this list. Defaults to False.




    Note: Remember to click Save after making changes to the parameter configuration.


CSV Index

Items with an asterisk (*) are required to perform this type of Test Data Query. 

  • path* - Defines the path where the CSV file is located.
  • subDir - Defines an optional subdirectory under the resourcePath where the CSV file exists.
  • fileName* - Defines the name of CSV file located on the user's computer.
  • dilimiter* - Defines what delimiter is used to separate column data within the CSV file.
  • rowIndex* - References an Attribute whose value determines the row in the CSV file to index in realtime. If the parameter is set to 4, the Generator will always return the 4th value of the CSV file. 

     

    Note: Remember to click Save after making changes to the parameter configuration.


Step 2: Import the CSV File

After the appropriate parameters have been configured, you will need to import the CSV File.

  • Click on Import within the CSV File Column Names pane.


  • Click on Choose File to select a local file from your computer.

  • Browse to the file, select it, and click on Open.


  • Click Save to import the file.


  • The file columns will appear within the CSV File Column Names pane, as shown below: 


Step 3: Add Domain Attributes and Columns


To finish the configuration, you will need to add the Domain Attributes data read from columns will be populated into for the Test Data Query. This will need to be done for each queried column of data in the CSV file.

  • Click on Add below the Domain/Attribute/Column table.


  • Select the Domain and Attribute from the drop-down menus.

  • Enter the name of the Column being read by the query in the CSV file.

  • Click Save to finish.


  • The new Domain Attribute will appear in the table as shown below:








    Note: Options in the Action Column can be used to edit or delete a Domain Attribute from the Test Data Query configuration.