|Test Data Engineer (TDE), Org Admin
With GenRocket, you can generate any type of synthetic test data needed to solve your test data challenges. However, synthetic test data does not always provide the data you require. Sometimes, real data needs to be queried and blended with synthetic test data to meet specific testing goals. This is where Test Data Queries come in.
Test Data Queries enable the blending of synthetic test data with real data. Within GenRocket, you can query real data from a database, CSV, or Excel file. This data can then be conditioned and blended with synthetic test data and applied to any Scenario, Scenario Chain, or Scenario Chain Set independently or with a Test Data Case.
In This Article
- Overview Video
- When Should Test Data Queries Be Used?
- What Are the Benefits of Queries?
- How to Access G-Queries
- Seven Types of Queries
- Sample SQL Query
- Prerequisite Steps
- How do Test Data Queries Work?
- Additional Information
When Should Test Data Queries Be Used?
- Any time real data needs to be blended with synthetically generated test data to meet specific testing goals.
- Allows users to query data from a database or file and blend it with synthetic data when generating test data.
- Allows users to perform queries using complex joins and to query for Attributes in multiple Domains.
How to Access G-Queries
- Select G-Queries from the Self Serve Menu Options menu.
|Query columns from one or more database tables as a set of data that is buffered into memory.
|Query one row of columns from one or more database tables on each row iteration of test data generation.
|From a CSV file, pull rows of data having one or more columns into memory as a list of data.
|From a CSV file, pull rows of data having one or more columns into memory and retrieve any row via its row index.
|Query columns from one or more database collections as a set of data that is buffered into memory. This is the same as Query Before but designed specifically for use with Mongo.
|From a sheet within an Excel file, pull rows of data having one or more columns into memory as a list of data.
select id, first_name, last_name, middle_initial, department_id, role_id from user where department_id = 2;
- GenRocket Runtime has been installed either locally or on a server.
- A config.properties file has been created to connect to the database and query data.
- Organization Resources have been configured appropriately.
- A Project/Project Version has been created or is available.
- Domains have been created or imported into the GenRocket web platform (varies depending on the source)
- Parent/Child Relationships have been configured (for multiple Domains).
- The appropriate Receiver has been assigned to the Domain. Varies based on the required output format:
- Directly insert into a Database (e.g., GenericSQLInsertReceiver, MongoDBInsertReceiver).
- Insert data into a Database using a file.
- Generate data in a different format (e.g., DelimitedFileReceiver, PDFFileReceier, JSONFileReceiver).
- A Scenario has been created for the Domain.
How do Test Data Queries Work?
- Add a new G-Query to the Project Version.
- Configure the query parameters to customize the query.
- Define the query. Data can be retrieved from a single table or multiple tables.
- Select the Domain and Attributes that will receive the queried data.
- Copy the command line and download the query to run it with a downloaded Scenario.
Note: Queries can be added to a Test Data Case. The query will be performed when the case is used to generate data. Please note that adding a large number of queries to a G-Case can slow down test data generation.
For more information, please see these additional articles regarding Test Data Queries:
|Learn more about configuring a database Query.
|Learn more about configuring a CSV file Query.
|Learn more about configuring a MongoDB Query.
|How to Add and Setup an Excel List Query
|Learn more about configuring an Excel List Query.
|How to Add Queries to a Test Data Case
|Learn how to add a Query to a Test Data Case.
|How to Generate Test Data with Queries and a Scenario
|Learn more about generating test data with Queries and a Scenario.