In the GenRocket web platform, within a given Project Version, Attributes may reference other Attributes in three primary levels:
- Domain Level - Withing a Domain, an Attribute may reference other Sibling Attributes. However, Domains are loosely coupled to each other at the Domain level. At the Domain level, parent, child and sibling relationships can be defined, but the relationships are conceptual and not concrete. Thus, at the Domain level, Attributes cannot reference other Attributes outside of their own Domain.
- Scenario Level - Within a Scenario, the parent, child and sibling relationships, which were defined conceptually at the Domain Level, are concrete at the Scenario level within Scenario Domains. Thus, at the Scenario level, Attributes can also reference Attributes from within other sibling Scenario Domains.
- Test Data Case Level - Within a Test Data Case, Domains are global to each other within a given Project Version. The relational coupling between Domains is loose because Test Data Case Domains are not associated with any Scenario and can only dynamically alter a given Scenario at runtime.
The three levels of Attribute referencing, described above, are very flexible and useful for most testing scenarios. However, there are testing scenarios that involve organization-level challenges where Attributes need to reference other Attributes where Domains are not directly related to each other or relationships between Domains cross Project level boundaries. This is where Organization Attributes come into view and can be used to solve this Test Data Challenge.
Attribute Referencing at the Organization Level
Organization Attributes provide a way to reference an Attribute at the Organization Level. Organization Attributes allow an Attribute's generated value to be referenced by multiple Projects without the need to perform the same steps to configure the Attribute in each Project. You can set up a collection of Organization Attributes with their own Generator configurations and then reference them via Test Data Cases as needed.
When Should Organization Attributes Be Used?
Organization Attributes should be used when the generated value needs to be referenced by multiple Projects within the Organization. This allows the Attribute to be referenced across Projects by multiple users without having to define the Attribute within each individual Project.
For example, let's say you need to set up an Attribute that uses linked Generators to generate a unique Code. This configuration takes time to set up for each Project that needs this Code as part of its generated test data. It would be very time consuming to set up the Attribute each time it is needed and have a greater risk of error.
Instead, an Organization Attribute can be configured with the 5 linked Generators to generate the required code value. This allows any Attribute created within a Test Data Case Domain to reference the Organization Attribute, code, without having to set up all the Generators each time for each Project/Project Version. Additionally, all Attributes referencing the Organization Attribute will be producing the same exact values.
How Do Organization Attributes Work?
To reference Organization Attributes, you will need to first set up and configure an Organization Attribute Suite consisting of one or more Attributes with their own Generator configurations.
Once this has been done, you will be able to reference the Organization Attributes within a Project Version's Test Data Cases for test data generation.
How to Access Organization Attributes
Organization Attributes are managed through the Organization Attribute Management Dashboard, which is accessed through the Management menu in the navigation bar.
Defining an Organization Attribute Example
Step 1: Create an Organization Attribute Suite
An Organization Attribute Suite contains one or multiple Organization Attributes. Each Attribute will have its own Generators and Parameter configurations. To view the step-by-step instructions for creating an Organization Attribute Suite, click here.
For this example, an Organization Attribute Suite titled "CustomerCollection" has been created.
Step 2: Add Organization Attributes to the Suite
Next, you will need to add Organization Attributes to the new suite. To view step-by-step instructions for adding Organization Attributes, click here.
For this example, 5 Organization Attributes have been added to the suite:
Step 3: Add and Configure Generators for Each Organization Attribute
To complete the Global Attribute configuration, you will need to add at least one Generator to each Organization Attribute.
A single Generator or multiple Generators can be added at one time to the selected Organization Attribute (highlighted in blue). To view step-by-step instructions, click here.
For this example, only one Generator has been assigned to each Organization Attribute. The image below shows the assigned Generator for the customerName Attribute.
Click on a Generator to select it. The selected Generator will be highlighted in blue and its Parameters will appear to the right. The steps for making changes to Generator Parameters and saving these changes are the same as when working with Domain Attributes.
Step 4: Reference Organization Attributes in Test Data Cases
Once your Organization Attributes have been created and configured with the appropriate Generators, they can be referenced by individual testers across Projects. For step-by-step instructions regarding how to reference Organization Attributes, click here.
Organization Attributes can be referenced through a Test Data Case Domain. You will need to access a specific Test Data Case Domain to reference the Organization Attribute.
To generate data using a referenced Organization Attribute, you will need to create a new Attribute for the Test Data Case Domain and add the Organization Attribute to it using the Add Organization Attribute button.
For this example, an Attribute has been added to the Test Data Case Domain for all 5 Organization Attributes created in Step 2.
Step 5: Generate Test Data
To generate test data for referenced Organization Attributes, you will need to run the Test Data Case with the Scenario in a Command or Terminal Window.
For this example, the command line would be:
genrocket -tdc SampleTestDataCaseSuite.gtdc:Unit.case1 -r CustomerScenario.grs
Note: Before running the Test Data Case, make certain you have the latest Generator and Receiver Libraries in your User_Home/.genrocket folder. If you do not have these libraries and are not using an offline certificate, please run the following command:
If you are using an offline certificate, please download the Libraries manually from the Options Menu in the navigation bar and place the Libraries in your .genrocket folder (the same location as your downloaded Profile).
The output for this example would appear as shown below: