A Domain within a Project is a template that contains specified Attributes, Generators, and Parent/Child/Sibling Relationships. When a Scenario is created, it is a copy of the Template Domain with the same Attributes, Generators, and Relationships.
GenRocket Domains control their own referential integrity via parent, child, and sibling relationships irrespective of the data model. When a change is made to the Template Domain or the Domain relationship, GenRocket will automatically refactor all the Scenarios associated to the Domain.
This is referred to as Domain Auto-Refactoring, which is the process of restructuring the existing Scenarios to match the re-defined Domain Relationships.
What is a Template Domain?
- A preset (i.e. template) consisting of Attributes, Generators, Parameter Configurations, and Parent/Child/Sibling Relationships within a Test Data Project.
What is a Scenario Domain?
- A copy of the Template Domain. A Scenario Domain can be modified without impacting the Template Domain configuration.
In This Article
- What is G-Refactor?
- How does G-Refactor work for Scenarios?
- Use Case Diagram 1: Add Root Parent
- Use Case Diagram 2: Insert Parent
- Use Case Diagram 3: Remove Root Parent
- How to Lock a Scenario, Scenario Domain, or Attribute
What is G-Refactor?
G-Refactor is the GenRocket tool that performs auto-refactoring for all Domains, Attributes and impacted Scenarios when changes are made to the Template Domain or Domain Relationships.
This GenRocket feature is very helpful to users who are creating and changing their database models, as it does not require the user to perform an extensive amount of steps to accommodate the change. When the change is made, all impacted Scenarios are updated automatically.
- Adding or Changing the Domain Relationship
Use Case Diagram 1: Add Root Parent
Use Case Diagram 2: Insert Parent
Use Case Diagram 3: Remove Root Parent
Within a Scenario, a user has the ability to lock a Scenario, Scenario Domain, or Attribute. When locked, G-Refactor will ignore the locked Scenario, Scenario Domain, or Attribute. This means that the item will not be refactored to reflect the change made to the Template Domain or the Domain Relationship change.
The Lock Icon can be used to lock a Scenario Domain or Attribute.
A user can also click on the Lock Button to lock a Scenario.
At any time, the Scenario, Scenario Domain, or Attribute can be unlocked and resynced to reflect what has been configured above it at the Template Level. This is accomplished by unlocking the item and then clicking on the Sync button.
Note: For more information about GenRocket Domains and knowing the Database Schema, please click here.