What is a Scenario?
A Scenario contains instructions that tell the GenRocket engine what synthetic data to generate and how much. Domains, Attributes, Generators, and Receivers are the building blocks for a Scenario.
A Scenario allows you to define instructions for generating test data. These instructions are defined by doing the following:
- Selecting one or more Domains to generate data.
- Specifying how much data each Domain will generate.
- Determining the sequence in which the Domains will generate their data.
- Downloading the Scenario to a computer.
- Executing the Scenario using the GenRocket Runtime Engine.
Note: Two or more Scenarios can be linked together (i.e., Scenario Chain), which is helpful when building data for complex data models.
In This Article
- Video Training
- Scenario Example 1 - Domains with No Relationships
- Scenario Example 2 - Domains with Parent/Child Relationships
- Primary Domain vs. Root Domain
- Can I generate data for all my related Domains in one Scenario?
- Do I need to create a Scenario for every Domain?
- Are the number of Scenarios limited per Project Version?
- Can relationships be defined at the Scenario level?
- Concepts and Additional Information
- Scenario "How-To" Articles
Video Training
For a quick video tutorial, please take a second to watch the video provided below:
Scenario Example 1 - Domains with No Relationships
In this example, a Scenario has been created for a User Domain with no defined relationships. This will generate test data for that Domain only.
Scenario Example 2 - Domains with Parent/Child Relationships
In this example, a Scenario has been created for an Address Domain. However, there are two more Domains.
- Department Domain - Parent of User Domain
- User Domain - Parent of Address Domain
Primary Domain vs. Root Domain
- Primary Domain - This is the Domain for which the Scenario has been created. The Scenario will generate data for the Primary Domain. In the example below, the Scenario has been created for the Student Domain.
- Root Domain - This is the very first parent in the hierarchy of the Domain for which the Scenario is created. In the example below, the Subject Domain is the Root Domain because it is the first parent in the hierarchy.
Note: If there is only one Domain in the Scenario, it will also be the Root Domain.
Can I generate data for all my related Domains in one Scenario?
No, but you can easily create different Scenarios for generating data for each of your Domains.
Let's suppose you have two Domains that are related: User and Address. A user can have one to many addresses. If you want to generate data for both Domains while maintaining referential integrity, you will have to create two scenarios:
- UserScenario
- AddressScenario
Once you create your Scenarios you can use a Scenario Chain to generate all of the data with one Scenario file. Scenario Chains can also be combined into Scenario Chain Sets for generating more complex data.
Do I need to create a Scenario for every Domain?
It is best practice to create a Scenario for every Domain. This ensures a Scenario is available to generate test data for that Domain.Are the number of Scenarios limited per Project Version?
Concepts and Additional Information
Topic | Description |
Scenario Dashboard | Learn more about the Scenario Dashboard user interface. |
Why can't I update the Loop Count Value from the Scenario? | Learn more about why the loop count cannot be updated from a Scenario. |
What are Scenario Variables? | Learn more about Scenario Variables. |
What are Scenario Level Locks? | Learn more about Scenario Level Locks. |
What is the Scenario Thread Engine? | Learn more about the Scenario Thread Engine. |
What is a Scenario Chain? | Learn more about Scenario Chains. |
What is a Scenario Chain Set? | Learn more about Scenario Chain Sets. |
Scenario "How-To" Articles
Topic | Description |
How do I create a Scenario? | Learn about the different ways a Scenario can be created. |
How do I use the Scenario Assignment Wizard? | Learn how to create Scenarios for multiple Domains at one time. |
How to Define Parent/Child Relationships at the Scenario Level | Learn how relationships can be defined at the Scenario level to meet specific testing needs. |
How do I download multiple Scenarios at once? | Learn how to batch-download Scenarios to your local machine. |
How do I run a GenRocket Scenario? | Learn how to generate test data with a basic Scenario. |
Terminate batch job (Y/N)? | Learn how to terminate a batch job on Windows, Mac OSx, or Linux. |
Managing Scenario State | Learn more about managing a Scenario's state. |
Windows: How to set Java Default Character Encoding to UTF-8 | Learn how to set Java Default Character Encoding for Windows. Note: This is sometimes necessary when generating test data with special symbols. |
Mac OS/Linux: How to set Java Default Character Encoding to UTF-8 | Learn how to set Java Default Character Encoding for Mac OSx or Linux. Note: This is sometimes necessary when generating test data with special symbols. |
Windows: How Do I Run GenRocket Scenarios via Jenkins? | See a Windows example of running GenRocket Scenarios via Jenkins. |
Mac OS/Linux: How Do I Run GenRocket Scenarios via Jenkins? | See a Mac OSx/Linux example of running GenRocket Scenarios via Jenkins. |