Description
Project Version Variables are a copy of the Domain Global Variables. The copy is created when a Project Version Variable Set is added to a selected Project Version. The set contains a copy of the variables, which have their own specific values.
One or many sets can be created within a Project Version. Once created, you can modify the values and select a set to be used with a Scenario during test data generation. These steps are shown later in this article.
For example, if two Domains are present (User and Address), GenRocket will create three Project Version Variables for each Domain.
- global.User.id
- global.User.loopCount
- global.User.seed
- global.Address.id
- global.Address.loopCount
- global.Address.seed
In This Article
- When Should Project Version Variables Be Used?
- Do I Need a Project Version Variables to Run Scenarios?
- How do I use Project Version Variables?
- How to View Project Version Variables
- Simple Use Case Example
When Should Project Version Variables Be Used?
- When testers need separate values for different Scenarios within a Test Data Project Domain.
- This allows different values to be used when generating data without impacting the Domain's default values.
Do I Need a Project Version Variables to Run Scenarios?
- No, you do not. By default, GenRocket Scenarios leverage the default Domain Global Variable values.
How do I use Project Version Variables?
- Select a Project and Project Version
- Create a new Project Version Variable Set
- Edit values for each desired Project Variable
- Select a Project Version Variable Set or in the Scenario
- (Optionally) Assign a Project Version Variable Set to a Scenario
- Download the Scenario and Generate Test Data
How to View Project Version Variables
- Select the Project Version Variable Tab within the Management pane.
- Then select a Project Version Variable Set.
Simple Use Case Example
Two users want to run the same Scenario. Each user requires the Domain Global Variables to have different values.
To accomplish this, they will need to be able to define these values separately and use them with the Scenario when it is downloaded. One way to do this is to create two Project Version Variable Sets (user1 and user2), as shown below:
- User 1
- global,id = 25
- global.loopCount = 100
- global.seed = 10
- User 2
- global,id = 50
- global.loopCount = 200
- global.seed = 20
User 1
User 2
Step 1 - Add a Project Version Variable Set
- In the Project Version Variables tab, click the New Project Version Variable Set button.
- Add a Name, enter a Description (Optional), and click Save.
Step 2 - Modify Project Version Variable Values
- Select a Project Version Variable Set from the drop-down menu.
- Click the Edit (Pencil) icon for the variable that needs to be modified.
- Update the Value for the variable and then click Save.
Step 3 - (Optional) Assign a Set to a Scenario
A Project Version Variable Set can be directly assigned to one or more Scenarios. The Project Version Variable Set will be selected automatically when assigned to a Scenario. Its values will be used when running the Scenario to generate test data. Complete the following steps to do so:
- Click on Assign to Scenarios.
- Use the checkboxes to select one or more Scenarios.
- Click the Save button once finished.
- When a Project Version Variable Set is assigned to a Scenario, it will be selected automatically in the Scenario Dashboard and used for test data generation.
Step 4 - Select a Set for the Scenario
Once defined, users can specify which Project Version Variables the Scenario should use by selecting a Variable Set from the drop-down menu. This is done within the Scenario Dashboard.
Step 5 - Download the Scenario and Generate Test Data
Once the Project Version Variable Set has been selected or assigned to the Scenario, you must download the Scenario, (or Scenario Chain / Scenario Chain Set) and any other required files. Then, generate the test data.