What is a Domain?
Domains define real-world objects. Think of a Domain as you would a noun: a person, place, or thing.
A Project Version within a Project can have several Domains. Each Domain can have one or many Attributes which define the characteristics of a Domain. These are referred to as Template Domains.
Domains represent a core part of a data model (e.g., a database table). At least one Domain must be set up within a Test Data Project to generate test data.
Some examples of Domains for Projects are shown below:
In This Article
- Training Video
- When Should Domains Be Used?
- How Do Domains Work?
- Can a Domain Reference Another Domain's Attributes?
- Can the Domain loopCount Value be passed at Runtime?
- How to View and Manage Domains
- How do I create Domains?
- Domains Example - Modeling a Database
- Learn More About Domains
Training Video
For a quick video tutorial, please take a second to watch the video provided below:
When Should Domains Be Used?
- Any time a user needs to generate test data for a data model.
How Do Domains Work?
- A Domain within a Project Version is a template that contains specified Attributes, Generators, and Parent/Child/Sibling relationships.
- GenRocket Domains control their own referential integrity via parent, child, and sibling relationships, irrespective of the data model.
- When a Scenario is created, it is a copy of the Template Domain that contains the same Attributes, Generators, and Relationships. This is referred to as a Scenario Domain.
- Changes made to the Template Domain or the Domain Relationship cascade down (or refactor) to each Scenario unless it is locked at that level.
Can a Domain Reference Another Domain's Attributes?
- A domain is just a template and works independently of any other Domain. We cannot establish any actual/real relationship between Domains. Relation at the Domain Level is just probable.
- As we can not establish any real relationship at the Domain Level, we can not reference any Attribute from the other Domain.
- This can be done at the Scenario Level or when using Test Data Cases.
Can the Domain loopCount Value be passed at Runtime?
- Yes, the apif command can be used to pass a loopCount value using a JSON file. Click here to learn more.
How to View and Manage Domains
Domains can be viewed and managed from two main dashboards within the GenRocket web platform.
- Project Dashboard - View, modify, and remove Domains through the Domains pane. This information is displayed automatically based on the selected Test Data Project and Project Version.
- Domain Dashboard - Select a Domain in the Domains pane to view more details.
be imported, created, viewed, and modified from the Domains Pane within the Project Dashboard.
How do I create Domains?
- Importing Data Model (e.g., XTS Wizard, JSON, DDL, XSD, CSV)
- Manually Create Each Domain (e.g., Scratch Pad, Quick Pattern Domain, New Domain)
Each time a Domain is created, it will have three default variables: id, loopCount, and seed. The default value for each of these variables is 1. Click here to learn more.
Domains Example - Modeling a Database
If a database is being modeled, a Domain represents a database table, and its Attributes represent the data columns within the table.
For example, a database with four tables is being modeled. The four tables listed below would be Domains, and any data elements in parenthesis would be Attributes.
- Company (name, address, city, state, zipCode)
- Department (name, phoneNumber)
- User (firstName, middleInitial, lastName, username, password)
- Address (streetAddress, city, state, zipCode)
This image shows the User Domain described above within the application:
Learn More About Domains
The topics below can be used to learn more about Domains:
Topic | Description |
How do I import my data model into GenRocket? | Learn about each available Domain creation and import method. |
Domain Dashboard | Learn more about the Domain Dashboard. |
What is a Scenario Domain? | Learn more about Scenario Domains. |
What is a Template File? | Learn about creating template files for a Domain. |
How do I set Parent/Child/Sibling Relationships between Domains? | Learn how to add a Domain as a referential Parent or Sibling for a selected Domain. |
How do I use the Domain Referencing Wizard? | Learn how to validate and set Parent-Child-Sibling Relationships after importing a data model. |
How do I change the loopCount for a Domain? | Learn how to change a Domain's loopCount. |
How to copy or replicate a Domain | Learn how to copy a Domain. |
How do I create a Domain Category? | Learn how to create Domain Categories. |