Description

Test Data Rules contain one or more Conditions and Actions, which define business logic to be applied when generating test data. A Test Data Rule Suite can have one or multiple Test Data Rules. 


What is a Test Data Rule? 

  • A Test Data Rule defines business logic in the form of a conditional if-then statement that can be applied when test data is generated. The business logic is defined through Conditions and Actions, which are specific to each rule. 


When should you use Test Data Rules? 

  • Any time you want to apply business logic during test data generation.


How do Test Data Rules work? 

A Test Data Rule can have one or multiple Conditions and Actions. Additionally, they can have a Default Rule, which will be applied when no defined conditions are met.

  1. Select a Project and Project Version.
  2. Select a Test Data Rule Suite.
  3. Add one or more Test Data Rules to the suite. 
  4. Add at least one Condition and Action for each rule. 

 

In This Article

This article will show how to complete the following for a Test Data Rule Suite:


Note: To learn more about creating and managing Conditions and Actions for a Test Data Rule, please see: How to configure Test Data Rule Conditions and Actions.


How to Add a Test Data Rule to a Suite

A Test Data Rule defines the business logic to be used when generating test data for a Project and its Domains. To create a new Test Data Rule, complete the following steps: 

  • Select the Test Data Rule Suite within the table by clicking on its Name.


  • Next, click on Add G-Rule located at the bottom of the Test Data Rule Table.


  • The Name of the rule will automatically be assigned by GenRocket (rule1, rule2, rule3,...).

  • Enter a Description for the rule and then click Save to finish.


    Note: Please note that the sample images are used to provide an easy to follow tutorial. The Description should be relevant to your logic and objective.


  • The new Test Data Rule will appear in the table as shown below and will automatically be selected (highlighted in blue).


    Note: After a Test Data Rule has been created, you will be able to add Conditions and Actions to apply the desired business logic to generated test data. For more information please see: How to configure Test Data Rule Conditions and Actions.

  • When several rules exist within a suite, they may be rearranged by clicking on the Rearrange Icon in the Action Column and dragging the rule to another position in the table.


How to Edit a Test Data Rule Description

The Description of a Test Data Rule may be changed at any time by completing the following steps: 

  • Click on the Edit (Pencil) Icon within the Action Column for the appropriate Test Data Rule.


  • Click on the input field to replace the Description.

  • Click Save to finish.


  • The new Description will appear within the table, as shown below:


How to Delete a Test Data Rule from a Suite

To remove a Test Data Rule from a suite, complete the following steps: 

  • Click on the Delete (Trash Can) Icon within the Action Column for the appropriate Test Data Rule.


  • Click Yes within the confirmation window to delete the Test Data Rule.


            Note: Click No to close the confirmation window without deleting the Test Data Rule.

  • The Test Data Rule will no longer appear in the table.