Description

A Default Rule is a default test data rule that can be set up and used when a test data record does not meet any of the defined Conditions within the set. The following applies to Default Rules:

  • Only 1 Default Rule can be added for a Test Data Rule Suite.
  • A Default Rule can have several Actions. 
  • Each Action is defined for 1 Domain and 1 Attribute.


When should you use a Default Test Data Rule? 

  • Any time you want to ensure an action is taken when defined conditions for all rules in the set are not met. 


How do they work? 

When the record does not meet any of the defined Conditions, the Action for the Default Rule will be taken for the record. To set up a Default Rule, complete these steps:

  1. Create a default Test Data Rule within a Suite.
  2. Add one or more Actions to the default Test Data Rule.


Note: If no Default Rule is defined, then data will be generated the same as when no Test Data Rules exist.


In This Article


Default Test Data Rule Example

In the example below, if the Account Balance is greater than 100 and less than 999, the individuals Account Type will be "General Customer"



How to add a Default Rule to a Test Data Rule Suite

Complete the following steps to add a Default Rule to a Test Data Rule Suite:  

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


  • Click on Add G-Rule Default located at the bottom of the Test Data Rule Table.


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


  • The Default Rule will appear in the Test Data Rule Table with "default" as the name: 


How to Create New Actions for a Default Rule

Once the Default Rule has been created, Actions can be added to determine what will happen when no other conditions are met. 


To add one or more Actions to the Default Rule, complete the following steps: 

  • Select the Default Rule within the Test Data Rule Table. 

  • It will be highlighted in blue when selected and is named "default".


  • Next, click on New Action.


  • The configuration window will appear as shown below:


  • Select a Domain from the drop-down menu for the Action. These are Domains within the Project the Test Data Rule Set belongs to.

  • Select an Attribute from the drop-down menu for the Action. These are Attributes within the selected Domain.


  • Two options are available for the Value Type: Constant and Generator

  • Choose an option and then follow the steps below based on that option.



  • Constant - Enter a Value to be assigned for the default rule (yes, no, true, false, etc.). 

  • If the value is a string, the Is String option will be checked automatically.


  • Generator - A Generator may be selected and used to assign a value for the default rule.

  • Enter a Generator name or click on the field to select one from a drop-down menu.


    Note: Detailed steps for setting up Actions with a constant value or selected Generator(s) can be found here: How to configure Test Data Rule Conditions and Actions.

  • Click Save to finish. In this example, Constant has been chosen as the Value Type and the Value is false.



  • The new Action will appear as shown below:


  • The Pseudo Code can be previewed to the right of the Action(s).


  • Additional Actions may be created for the Default Rule by completing the same steps again.

  • When multiple Actions exist for a Default Rule, the order can be changed by performing a Click+Drag action.


How to Edit Actions for a Default Rule

To edit an Action for a Default Rule, complete the following steps: 

  • Click on the Edit (Pencil) Icon within the Action Column of the Default Actions Table.


  • Use the drop-down menus and input fields to make changes to one or all of the following: 
    • Domain
    • Attribute
    • Value Type
    • Value (or) Generator
    • Is String

  • Click Save to finish. For this example, the Value has been changed to "true".


  • Changes will be reflected in the Default Actions Table.


How to Delete Actions from a Default Rule

To delete an Action from a Default Rule, complete the following steps: 

  • Click on the Delete (Trash Can) Icon within the Action Column of the Default Actions Table.


  • Click Yes in the confirmation window to delete the Action from a Default Rule,


    Note: Click No to close the confirmation window without deleting the Action.


How to Edit the Default Rule Description

To edit a Default Rule's description, complete the following steps: 

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



  • Use the input fields to change the Description for the Default Rule.

  • Click Save to finish. Changes will be reflected in the Test Data Rules Table.


How to Delete a Default Rule from a Test Data Rule Suite

To delete the Default Rule from the set, complete the following steps: 

  • Click on the Delete (Trash Can) Icon within the Action Column of the Test Data Rules Table.


  • Click Yes in the confirmation window to delete the Default Rule from the Test Data Rule Set.


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