Description
GenRocket Query Generators query columns, tables, or a list of values within a specified file or database during test data generation. GenRocket provides several Query Generators described in further detail within this article.
In This Article
- When should Query Generators be used?
- Why are Query Generators useful?
- Database Table/Column Query Generators
- MongoDB Query Generators
- CSV File Query Generators
- Excel File Query Generators
- Salesforce Query Generators
- Other Query Generators
When should Query Generators be used?
- Any time you want to query real data from within a specified file or database.
Why are Query Generators useful?
- Query Generators make it easy to blend real data values with synthetically generated data. For example, combining real postal addresses with synthetically generated names.
- Query Generators make it easy to create a subset of real production data.
Database Table/Column Query Generators
The following Query Generators can be used to query database tables and columns:
Generator Name | Description | Additional Reading |
QueryBeforeLoopGen | Queries a column within a table using an SQL select statement BEFORE the 1st iteration of test data generation. | Not Currently Available |
QueryBeforeLoopV2Gen | Queries a column within a table using an SQL select statement BEFORE the 1st iteration of test data generation. | How do I use the QueryBeforeLoopV2Gen Generator? |
QueryCountGen | Create and execute a 'selectcount(*)' query statement. | Not Currently Available |
QueryCountV2Gen | Create and execute a 'selectcount(*)' query statement. | Not Currently Available |
QueryEachLoopGen | Query a column within a database table using an SQL select statement on EACH iteration of test Generation. | Not Currently Available |
QueryEachLoopV2Gen | Query a column within a database table using an SQL select statement on EACH iteration of test Generation. | How do I use the QueryEachLoopV2Gen Generator? |
QueryEachToMapGen | Using SQL, query one or more columns within a table in a database allowing for full select statements to be executed during EACH iteration of a given Generator. | Not Currently Available |
QueryEachFromMapGen | Reads the value of a particular column from the result of QueryEachToMapGen. | Not Currently Available |
QueryToMapGen | Query data from one or more database table columns into a memory buffer. | How do I use the QueryToMapGen Generator? |
QueryFromMapGen | Maps to a given column that is managed by the QueryToMapGen to generate its data for a given Attribute. | How do I use the QueryFromMapGen Generator? |
QueryLoopSetGen | Query only once within a table in a database and set the loopCount. | Not Currently Available |
QueryMapBeforeLoopGen | Query two columns from one or more joined database tables to create a map in memory. | Not Currently Available |
QueryOnceGen | Query only once within a table of a database using SQL. | Not Currently Available |
QueryOnceV2Gen | Query only once within a table of a database using SQL. | Not Currently Available |
QueryReGenerateOnHitGen | Query a column in a database table, using an SQL statement, on EACH iteration of test generation and validates whether the referenced value exists or not. If the value exists, the Generator calls the Generator of referenced value to regenerate the next value, which is again validated for its existence. | How do I use the QueryReGenerateOnHitGen? |
QueryMaxGen | QueryMaxGen Generator allows querying the max value of a column within a table using an SQL select max() statement. | Not Currently Available |
QueryContextLoadListGen | Queries a database table and loads resulting data into a list that is stored in memory. | Not Currently Available |
QueryContextLoadMapGen | Queries multiple database columns and loads the resulting data into maps stored in memory. | Not Currently Available |
RangeQueryGen | Query for max row within a given table and set the startRange to the value of the result returned + 1. | Not Currently Available |
RangeQueryV2Gen | Query for max row within a given table and set the startRange to the value of the result returned + 1. | Not Currently Available |
MongoDB Query Generators
The following Query Generators can be used to query data within a MongoDB database:
Generator Name | Description | Additional Reading |
MongoToMapGen | Queries data from one or more database collection columns into a memory buffer. | How do I use the MongoToMapGen and MongoFromMapGen Generators? |
MongoFromMapGen | Maps to a given column that is managed by a MongoToMapGen Generator to generate its data for a given Attribute. | How do I use the MongoToMapGen and MongoFromMapGen Generators? |
MongoEachToMapGen | Allows you to query one or more columns within a collection in a database allowing Find or Aggregate Query to be executed during EACH iteration of a given Generator. | How do I use the MongoEachToMapGen Generator? |
MongoEachFromMapGen | Maps to a given column that is managed by a MongoEachToMapGen Generator to generate its data for a given Attribute. | How do I use the MongoEachFromMapGen Generator? |
CSV File Query Generators
The following Query Generators can be used to query data and metadata within CSV files:
Generator Name | Description | Additional Reading |
CSVToMapGen | Allows you to read data from one or more columns from a CSV file. | How do I use the CSVToMapGen and CSVFromMapGen Generators? |
CSVFromMapGen | Reads the value of a particular column by Column Name from the result of CSVToMapGen. | How do I use the CSVToMapGen and CSVFromMapGen Generators? |
CSVIndexToMapGen | Reads the value of one or more columns from a particular row in a CSV file. | Not Currently Available |
CSVIndexFromMapGen | Reads the value of a particular column by Column Name from the result of CSVIndexToMapGen. | Not Currently Available |
CSVResourceGen | Loads column data from the first detail row within a CSV file. | Not Currently Available |
CSVResourceIndexGen | Loads column data from a given row within a CSV file. | Not Currently Available |
ListCSVGen | Loads list from column data within a CSV file. | How do I use the ListCSVGen Generator? |
ListCSVV2Gen | Loads list from column data within a CSV file. | Not Currently Available |
ListCSVIndexGen | Loads list from column data within a CSV file. | How do I use the ListCSVIndexGen? |
MapCSVGen | Loads list from column data within a CSV file. | How do I use the MapCSVGen Generator? |
MapCSVChildGen | Loads list from column data within a CSV file based on key column. | Not Currently Available |
MapCSVManualDistGen | Loads key/value pair into map from column data present in the CSV file and finds the closest key based on referenced value. | Not Currently Available |
MultiKeyMapCSVGen | Generates data as a result of mapping multiple keys generated from a set of Attributes to values from a CSV file matching those keys in a CSV file. | Not Currently Available |
CSVChildToMapGen | Reads data from one or more columns in a CSV file. | Not Currently Available |
CSVChildFromMapGen | Reads the value of a particular column by Column Name from the result of CSVChildToMapGen Generator. | Not Currently Available |
CSVMapIndexGen | Reads data from CSV file and creates Index Map. The CSVMapIndexOffsetIndexGen Generator uses the Index Map to find the offset index value. | Not Currently Available |
CSVMapIndexOffsetIndexGen | Returns the Offset Index value from Index Map, managed by the CSVMapIndexGen Generator. | Not Currently Available |
PermutationCSVGen | Loads a list of values from a CSV file. Then it communicates with other Attributes within the same Domain, using a Permutation type Generator to compute the sum of all possible permutations. | Not Currently Available |
EvalCaseSentenceCSVGen | Emulates multiple if-then-else cases by returning the first true value and loading the Subject, Predicates, and Clause from a CSV file to make sentences. | How do I use the EvalCaseSentenceCSVGen Generator? |
SentenceCSVGen | Loads the Subject, Predicates, and Clause from a CSV file to make sentences. | How do I use the SentenceCSVGen Generator? |
MultiWeightCSVGen | Allows multiple values to have weighting to determine how often each value is generated. Values and their respective weights are read from the delimited file at runtime. | How do I use the MultiWeightCSVGen Generator? |
ListSwitchCSVGen | Reads metadata from a CSV file to map multiple ListGen Generators into memory via a key. The key allows it to switch between ListGen Generators. | Not Currently Available |
MultiWeightSwitchCSVGen | Reads metadata from a CSV file to map multiple MultiWeightGen Generators into memory via a key. The kay allows it to switch between multiple MultiWeightGen Generators. | How do I use the MultiWeightSwitchCSVGen Generator? |
MultiWeightDateSwitchCSVGen | Reads metadata from a CSV file to map multiple MultiWeightDateGen Generators into memory via a key. The kay allows it to switch between multiple MultiWeightDateGen Generators. | Not Currently Available |
PartitionCntxtMap RandomChildSwitchCSVGen | Reads metadata from a CSV file to map multiple MeanRandomNumberDistGen Generators into memory via a key. The key allows it to switch between multiple MeanRandomNumberDistGen Generators. | Not Currently Available |
PercentCalcSwitchCSVGen | Reads metadata from a CSV file to map multiple PercentCalcGen Generators into memory via a key. The key is used to switch between multiple PercentCalcGen Generators. | Not Currently Available |
RandomNumbDistSwitchCSVGen | Reads metadata from a CSV file to map multiple RandomNumbDistGen Generators into memory via a key. The key is used to switch between multiple RandomNumbDistGen Generators. | Not Currently Available |
RandomNumberSwitchCSVGen | Reads metadata from a CSV file to map multiple RandomGen Generators into memory via a key. The key is used to switch between multiple RandomGen Generators. | Not Currently Available |
Excel File Query Generators
The following Query Generators can be used to query data within Excel files. Please note that Excel queries are generally slower than CSV queries.
Generator Name | Description | Additional Reading |
ListExcelGen | Loads its list from the column data within an Excel file. | Not Currently Available |
ExcelToMapGen | Reads data from one or more columns from an Excel file. | How do I use the ExcelToMapGen and ExcelFromMapGen Generators? |
ExcelFromMapGen | Reads the value of a particular column by Column Name from the result of ExcelToMapGen. | How do I use the ExcelToMapGen and ExcelFromMapGen Generators? |
ExcelChildToMapGen | Read data from one or more columns from an Excel file. | Not Currently Available |
ExcelChildFromMapGen | Reads the value of a particular column from the result of ExcelToMapGen. | Not Currently Available |
MapExcelGen | Reads data from Excel Spreadsheet and returns the first matched value from the column provided in the valueColumn parameter. | Not Currently Available |
MapExcelChildGen | Reads data from Excel Spreadsheet and creates Map again on every Child Domain iteration and returns the matched value from the column provided in valueColumn parameter. | How do I use the MapExcelChildGen Generator? |
Salesforce Query Generators
The following Query Generators can be used to query data within Salesforce objects.
Generator Name | Description | Additional Reading |
SFQueryGen | Query a column of data from a Salesforce object. The query takes place in real time via a Salesforce REST web service call. | How do I use the SFQueryGen Generator? |
SFQueryEachLoopGen | Query a column of data from a Salesforce object on each iteration. The query takes place in real time via a Salesforce REST web service call. | How do I use the SFQueryEachLoopGen Generator? |
SFPickListGen | Query a Salesforce object description for a given fieldName, and if its Type is equal to picklist, it will read the picklist Values as its set of values to generate. | How do I use the SFPickListGen Generator? |
Other Query Generators
Additional Query Generators available for querying data:
Generator Name | Description | Additional Reading |
PermutationQueryGen | Queries a list of values used with other Permutation Generators to compute a sum of permutations. It will generate all possible combinations of data for a given set of values queried from a set column within a database. | How do I use the PermutationQueryGen? |