What is a List Generator?
List Generators can be used to generate lists of values either by generating a specific type of list, manually entering the values (e.g., ListGen), or loading them from a file (CSV, Excel, JSON, etc.),
Available List Generators
The following list Generators are currently available in GenRocket:
Generator | Description | Example |
CompareListGen | Check if the referenced Attribute value is in the list and returns "true" or "false". | A list has these values: 1, 2, 3, 4, 5 The referenced Attribute's value is '3', and the Generator returns "true" |
CountryListGen | Generate a list of countries in sequential or random order. | Fojo. Monaco, Sweden, etc. |
CurrencyCodeListGen | Generates the currency code list in ascending, descending, or randomly. | MZN, EUR, HRK, KWD,.. |
ListCopyGen | Makes a copy of the values of another Domain Attribute into its own list. This Generator is best used to reference Domain Attributes that reference a list of values. Still, it can easily copy the value from any non-list type Generator, resulting in a list of one value. | Copy from a Domain Attribute that has been assigned the ListCSVGen, which contains 15 values. These same 15 values would be copied by this Generator for the Attribute to which it has been assigned. |
ListGen | Generates items from a provided list in sequential or random order. | Red, Green, Blue, Yellow Apple, Grape, Banana, Blueberry Bronze, Silver, Gold, Platinum |
ListCSVGen | Loads its items from column data within a CSV file. Note: The data is loaded into memory during test data generation. | Tab-delimited CSV file Column Name - Company Value 1 - Toy Company Value 2 - Everyday Outlet Value 3 - Shoes Unlimited ... |
ListCSVV2Gen | Loads its items from column data within a CSV file. Note: This generator works like ListCSVGen but has two additional parameters: refreshList and noDataException. | Tab-delimited CSV File Column Name - Company Value 1 - Toy Company Value 2 - Everyday Outlet Value 3 - Shoes Unlimited ... |
ListCSVIndexGen | Loads its list from column data within a CSV file with the help of a column index. Note: The index starts at 0, representing the file's first column. | CSV has four columns: employeeId, jobTitle, empCode, and location. The tester wants to load data from the empCode column, index '2' in the file. Sample data: Value 1 - CX3P75 Value 2 - DWY678 Value 3 - UZH900 ... |
ListJSONGen | Parses a JSON file and retrieves data from specified fields for an Attribute. | A flat or nested JSON file contains user, order and product information. This Generator can be assigned to an Attribute an used to retrieve the products (or another value) for each order in the desired output format. |
ListSwitchCSVGen | Reads metadata from a CSV file to map multiple ListGen Generators into memory via a key. The key allows it to switch between ListGens. | Coming soon |
ListExcelGen | Loads its item from column data within an Excel file. | Column Name - Fruits Value 1 - Apple Value 2 - Banana Value 3 - Grape ... |
ListFileNameGen | Loads a list of file names present within a directory (recursively). Data is output as a text file with the Scenario name. Depending on the parameter configuration, the list can contain each file's full file name or the entire path (absolute path). | File Name Only Test1, Test2, Test3 Path and File Name /home/users/jdoe/documents/testfiles/Test1 /home/users/jdoe/documents/testfiles/Test2 /home/users/jdoe/documents/testfiles/Test3 |
ListFixedFileGen | Loads data list from a fixed file by using the start position and length of the string. | apple, orange, strawberry, banana, grape, etc. |
ListMultiWaitGen | It allows you to enter multiple items in a list and assign a wait (repeat) amount for each item. A wait amount is the number of times a value is repeated before moving on to the next value in the list. | valueList -> [Apple, Grape, Banana] waitList = [1,3,2] would produce the following generated sequence of values:
|
ListMultiWeightWaitGen | Enter multiple items in a list and assign a wait (repeat) amount as a percentage for each of those items. A percent wait amount is the N percent of times a value is repeated before moving on to the next value in the list. | valueList -> [Apple, Grape, Banana] waitList = [20, 30, 50] would produce the following generated sequence of values: |
PermutationGen | Generates all possible combinations of data for a given set of values. | List Values = red, blue, green permutation 1 = red, blue, green permutation 2 = blue, green, red permutation 3 = green, red, blue ... |
UnitedStatesListGen | Generates United States state name, state capital, state abbreviation, capital zip code, capital county, and capital area code. You can generate the data in alphabetical or random order. | State Name = Texas, New York, Arizona State Abbreviation = TX, NY, AZ State Capital = Austin, Albany, Pheonix Zip Code = 73301, 12201, 85001 Area Code = 512, 518. 480 |