Description
The ListCSVV2Gen Generator loads its list from column data within a CSV file.
Note: Use ListCSVV2Gen Generator for more than 15 records. Otherwise, it is recommended to use the ListGen Generator.
In This Article
- Generator Parameters
- Preview Showing Empty Values - List Parameter
- Example - Load First Names from CSV File
- CSV File and Generated Output
Generator Parameters
The following parameters may be configured for the ListCSVV2Gen Generator. Items with an asterisk* are required.
- filePath* - Defines the path where the CSV file is located.
- fileSubDir* - Defines an optional subdirectory under the filePath where the CSV file exists.
- fileName* - Defines the name of the CSV file to open.
- columnName* - Defines which column in the CSV to read data from.
- delimiter* - Defines what delimiter is used to separate column data within the CSV file.
- waitAmount* - Defines the number of iterations the Generator should wait before moving to the next value in the list.
- setLoop* - Defines whether the size of the list should be used to set the Scenario loop value.
- sortOrder* - Defines whether the list should be sorted and, if so, in ascending, descending, or random order.
- seed - Defines an optional seed for randomization. Using the see will ensure that the same random data is generated each time data is generated.
- iterate - Based on the Boolean value, determines when to generate the next value. If the value is true, it generates the next value. If the value is false, it just waits.
- list - Stores one value on each line for the list. To add values, type them in and then press the Enter Key. Note that the listed value is only for simulation mode. When running a true Scenario, the data will be loaded from the specified resource.
- startIndex* - Defines the index in the list on where to start from.
- jumpAmount* - Defines the amount to add to the index of generated value.
- refreshList - Defines whether to refresh the list every time GenRocket Engine lands on the Child Domain during the iteration.
- noDataException - Defines whether to throw an exception if the CSV file has no data. The default value is "True."
Preview Showing Empty Values - List Parameter
The ListCSVV2Gen generator reads the data from the given CSV file and loads the data while running the Scenario on the user's system locally.
The list parameter can be used to simulate data displayed in the Preview pane on the GenRocket web app.
If no values are entered for the list parameter, the preview will show Empty values for each record.
Example - Load First Names from CSV File
For this example, the ListCSVV2Gen Generator will be assigned to a firstName Attribute within a User Domain.
The following ListCSVV2Gen Generator Parameters have been changed before downloading the Scenario and generating the data:
- filePath - #(resource.output.directory)
- fileName - User.csv
- columnName - firstName
- delimiter - comma (,)
CSV File and Generated Output
The ListCSVV2Gen Generator used the following CSV file for the firstName Attribute:
The first names within the generated output file match the first names within the CSV File.