Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Now we will modify the Vera polices to support new business rules.

Table of Contents

Sample Business Rules

We will configure Vera to support the following chart.

...

Info

*Approve after other approvals are complete. Quality will approve after Product Lead approval.

**prevent author approval

If Regulatory field value is not set it should be evaluated as None.

Vera Analysis & Design

Based on the above requirement we will need to make the following modifications:

...

Info

Rank determines the order Route Templates are evaluated by Vera when a record is routed for approval. Use Rank to ensure Constraints are evaluated in the proper order. General is the lowest rank so it is the last Approval Template evaluated.

qTest Project Configuration

First we will look at qTest project Field Settings for Test Case.

  1. We need to update the Test Case Type Combo box list values by adding:

    1. Data Migration

    2. Configuration

    3. System

    4. Acceptance

  2. We need to add a new Test Case custom field Regulation Combo box and add the following list values:

    1. None

    2. SOX

    3. GxP

    4. SOX & GxP

Vera Configuration

Now that you evaluated the business rules and updated qTest, you can update the Records Management Policy and the Approval Policy.

Records Management Policy updates

We are going to update the Records Management Policy from Add Test Run Records to Records Management Policy . Open VeraRMPTutorial-part2.json in an editor for modification.

...

View file
nameVeraRMPTutorial-part3.json

Approval Policy updates

We are going to update the Approval Policy from Add Approval Template to Approval Policy. Open VeraAPTutorial-part1.json in an editor for modification.

First you will update Approval Roles, then you will add the Approval Templates in Rank order to make it easier to manage and troubleshoot.

Approval Roles

There are new Approval Roles you need to add to the Approval Policy: Data Owner, Product Team Member and Product Lead.

Code Block
languagejson
      "Approval Groups": [
        "Business",
        "Technical",
        "Quality",
        "Data Owner",
        "Product Team Member",
        "Product Lead"
      ]

Approval Templates

Now we can add the new Approval Templates and update the General Approval Template.

Data Migration Test Case

Configuration element

Value

Code Snippet

Name

Data Migration Test Case

Code Block
"Name": "Data Migration Test Case"

Rank

 10

Code Block
"Rank": "10"

Record Type

qTest Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = Data Migration

The Field Is Equal or Field Is One Of constraint can be used for this business rule.

Code Block
"Constraints": [
  {
    "Type": "Field Is Equal",
    "Name": "Type",
    "Value": "Data Migration"
  }
]

Level 1 Approvers

Technical,

Business,

Data Owner

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Technical",
      "Business",
      "Data Owner"
    ]
  }
]

Level 2 Approvers

Quality

Code Block
"Levels": [
  {
    "Name": "Level 2",
    "Approvers": ["Quality"]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "Data Migration Test Case",
        "Rank": "10",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Values": ["Data Migration"]
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Technical","Business","Data Owner"]
          },
          {
            "Name": "Level 2",
            "Approvers": ["Quality"]
          }
        ]
      } 
    ]
  }

GxP Configuration Test Case

Configuration element

Value

Code Snippet

Name

GxP Configuration Test Case

Code Block
"Name": "GxP Configuration Test Case"

Rank

20

Code Block
"Rank": "20"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = Configuration,

Regulation = GxP

The Field Is Equal or Field Is One Of constraint can be used for this business rule.

Code Block
  Constraints": [
    {
      "Type": "All",
      "Constraints": [
        {
          "Type": "Field Is Equal",
          "Name": "Type",
          "Value": "Configuration"
        },
        {
          "Type": "Field Is One Of",
          "Name": "Regulation",
          "Values": ["GxP"]
        }
      ]
    }
  ]

Note: The All Boolean constraint is the default constraint.

Level 1 Approvers

Technical

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": ["Technical"]
  }
]

Level 2 Approvers

Quality

Code Block
"Levels": [
  {
    "Name": "Level 2",
    "Approvers": ["Quality"]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "GxP Configuration Test Case",
        "Rank": "20",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        Constraints": [
          {
            "Type": "All",
            "Constraints": [
              {
                "Type": "Field Is Equal",
                "Name": "Type",
                "Value": "Configuration"
              },
              {
                "Type": "Field Is One Of",
                "Name": "Regulation",
                "Values": ["GxP"]
              }
            ]
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Technical"]
          },
          {
            "Name": "Level 2",
            "Approvers": ["Quality"]
          }
        ]
      } 
    ]
  }

GxP System Test Case

Configuration element

Value

Code Snippet

Name

GxP System Test Case

Code Block
"Name": "GxP System Test Case"

Rank

30

Code Block
"Rank": "30"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = System,

Regulation = GxP

The Field Is Equal or Field Is One Of constraint can be used for this business rule.

Code Block
  "Constraints": [
    {
      "Type": "Field Is Equal",
      "Name": "Type",
      "Value": "System"
    },
    {
      "Type": "Field Is One Of",
      "Name": "Regulation",
      "Values": ["GxP"]
    }
  ]

Note: The All Boolean constraint is the default constraint.

Level 1 Approvers

Technical,

Business

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Technical",
      "Business"
    ]
  }
]

Level 2 Approvers

Quality

Code Block
"Levels": [
  {
    "Name": "Level 2",
    "Approvers": ["Quality"]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "GxP System Test Case",
        "Rank": "30",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Value": "System"
          },
          {
            "Type": "Field Is One Of",
            "Name": "Regulation",
            "Values": ["GxP"]
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Technical", "Business"]
          },
          {
            "Name": "Level 2",
            "Approvers": ["Quality"]
          }
        ]
      } 
    ]
  }

GxP Acceptance Test Case

Configuration element

Value

Code Snippet

Name

GxP Acceptance Test Case

Code Block
"Name": "GxP Acceptance Test Case"

Rank

40

Code Block
"Rank": "40"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = Acceptance,

Regulation = GxP

The Field Is Equal or Field Is One Of constraint can be used for this business rule.

Code Block
  "Constraints": [
    {
      "Type": "Field Is Equal",
      "Name": "Type",
      "Value": "Acceptance"
    },
    {
      "Type": "Field Is One Of",
      "Name": "Regulation",
      "Values": ["GxP"]
    }
  ]

Note: The All Boolean constraint is the default constraint.

Level 1 Approvers

Business

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Business"
    ]
  }
]

Level 2 Approvers

Quality

Code Block
"Levels": [
  {
    "Name": "Level 2",
    "Approvers": ["Quality"]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "GxP Acceptance Test Case",
        "Rank": "40",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Value": "Acceptance"
          },
          {
            "Type": "Field Is One Of",
            "Name": "Regulation",
            "Values": ["GxP"]
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Business"]
          },
          {
            "Name": "Level 2",
            "Approvers": ["Quality"]
          }
        ]
      } 
    ]
  }

SOX Test Case

Configuration element

Value

Code Snippet

Name

SOX Test Case

Code Block
"Name": "SOX Test Case"

Rank

50

Code Block
"Rank": "50"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = SOX

The Field Is Equal or Field Is One Of constraint can be used for this business rule.

Code Block
  "Constraints": [
    {
      "Type": "Field Is Equal",
      "Name": "Type",
      "Value": "SOX"
    }
  ]

Note: The All Boolean constraint is the default constraint.

Level 1 Approvers

Product Team Member

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Product Team Member"
    ]
  }
]

Level 2 Approvers

Product Lead

Code Block
"Levels": [
  {
    "Name": "Level 2",
    "Approvers": ["Product Lead"]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "SOX Test Case",
        "Rank": "50",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Value": "SOX"
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Product Team Member"]
          },
          {
            "Name": "Level 2",
            "Approvers": ["Product Lead"]
          }
        ]
      } 
    ]
  }

SOX & GxP Test Case

Configuration element

Value

Code Snippet

Name

SOX & GxP Test Case

Code Block
"Name": "SOX & GxP Test Case"

Rank

60

Code Block
"Rank": "60"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = SOX & GxP

The Field Is Equal or Field Is One Of constraint can be used for this business rule.

Code Block
  "Constraints": [
    {
      "Type": "Field Is Equal",
      "Name": "Type",
      "Value": "SOX & GxP"
    }
  ]

Note: The All Boolean constraint is the default constraint.

Level 1 Approvers

Technical, Business

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Technical", 
      "Business"
    ]
  }
]

Level 2 Approvers

Product Lead

Code Block
"Levels": [
  {
    "Name": "Level 2",
    "Approvers": ["Product Lead"]
  }
]

Level 3 Approvers

Quality

Code Block
"Levels": [
  {
    "Name": "Level 3",
    "Approvers": ["Quality"]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "SOX & GxP Test Case",
        "Rank": "60",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Value": "SOX & GxP"
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Technical", "Business"]
          },
          {
            "Name": "Level 2",
            "Approvers": ["Product Lead"]
          },
          {
            "Name": "Level 3",
            "Approvers": ["Quality"]
          }
        ]
      } 
    ]
  }

Configuration Test Case

Configuration element

Value

Code Snippet

Name

Configuration Test Case

Code Block
"Name": "Configuration Test Case"

Rank

70

Code Block
"Rank": "70"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = Configuration,

Regulation = None

OR

Regulation IsEmpty

The Field Is Equal, Field Is One Of or Field Is Not One Of constraint can be used for this business rule. The Any constraint can be used if only one constraint needs to be true.

Code Block
  "Constraints": [
    {
      "Type": "Field Is Equal",
      "Name": "Type",
      "Value": "Configuration"
    },
    {
      "Type": "ANY",
      "Constraints": [
        {
          "Type": "Field Is Equal",
          "Name": "Regulation",
          "Value": "None"
        },
        {
          "Type": "Field Is Empty",
          "Name": "Regulation"
        }
      ]
    }
  ]

Level 1 Approvers

Technical,

Technical

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Technical",
      "Technical"
    ]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "Configuration Test Case",
        "Rank": "70",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Value": "Configuration"
          },
          {
            "Type": "ANY",
            "Constraints": [
              {
                "Type": "Field Is Equal",
                "Name": "Regulation",
                "Value": "None"
              },
              {
                "Type": "Field Is Empty",
                "Name": "Regulation"
              }
            ]
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Technical", "Technical"]
          }
        ]
      } 
    ]
  }

System Test Case

Configuration element

Value

Code Snippet

Name

System Test Case

Code Block
"Name": "System Test Case"

Rank

80

Code Block
"Rank": "80"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = System,

Regulation = None

OR

Regulation IsEmpty

The Field Is Equal, Field Is One Of or Field Is Not One Of constraint can be used for this business rule.

Code Block
  "Constraints": [
    {
      "Type": "Field Is Equal",
      "Name": "Type",
      "Value": "System"
    },
    {
      "Type": "Field Is Not One Of",
      "Name": "Regulation",
      "Values": [
        "GxP",
        "SOX",
        "SOX & GxP"
      ]
    }
  ]

Note: The All Boolean constraint is the default constraint.

Level 1 Approvers

Product Team Member,

Product Team Member

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Product Team Member",
      "Product Team Member"
    ]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": "System Test Case",
        "Rank": "80",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Value": "System"
          },
          {
            "Type": "Field Is Not One Of",
            "Name": "Regulation",
            "Values": [
              "GxP",
              "SOX",
              "SOX & GxP"
            ]
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Product Team Member", "Product Team Member"]
          }
        ]
      } 
    ]
  }

Acceptance Test Case

Configuration element

Value

Code Snippet

Name

Acceptance Test Case

Code Block
"Name": "Acceptance Test Case"

Rank

90

Code Block
"Rank": "90"

Record Type

Test Test Case,

Automated Test Case

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case"
]

Constraints

Type = Acceptance,

Regulation = None

OR

Regulation IsEmpty

The Field Is Equal, Field Is Not Equal, Field Is One Of or Field Is Not One Of constraint can be used for this business rule.

Code Block
"Constraints": [
    {
      "Type": "Field Is Equal",
      "Name": "Type",
      "Value": "Acceptance"
    },
    {
      "Type": "Field Is Not Equal",
      "Name": "Regulation",
      "Value": "GxP"
    },
    {
      "Type": "Field Is Not Equal",
      "Name": "Regulation",
      "Value": "SOX"
    },
    {
      "Type": "Field Is Not Equal",
      "Name": "Regulation",
      "Value": "SOX & GxP"
    }
  ]

Note: The All Boolean constraint is the default constraint.

Level 1 Approvers

Business,

Business

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Business",
      "Business"
    ]
  }
]

Prevent Author Approval

FALSE

Code Block
"Prevent Author Approval": false

...

Code Block
 {
    "Route Templates": [
      {
        "Name": " Acceptance Test Case",
        "Rank": "90",
        "Prevent Author Approval": false,
        "Record Types": [
          "qTest Test Case",
          "Automated Test Case"
        ],
        "Constraints": [
          {
            "Type": "Field Is Equal",
            "Name": "Type",
            "Value": "Acceptance"
          },
          {
            "Type": "Field Is Not Equal",
            "Name": "Regulation",
            "Value": "GxP"
          },
          {
            "Type": "Field Is Not Equal",
            "Name": "Regulation",
            "Value": "SOX"
          },
          {
            "Type": "Field Is Not Equal",
            "Name": "Regulation",
            "Value": "SOX & GxP"
          }
        ],
        "Levels": [
          {
            "Name": "Level 1",
            "Approvers": ["Business", "Business"]
          }
        ]
      } 
    ]
  }

Default

Configuration element

Value

Code Snippet

Name

Default

Code Block
"Name": "Default"

Rank

 100

Code Block
"Rank": "100"

Record Type

Any

Add all record types

Code Block
"Record Types": [
  "qTest Test Case",
  "Automated Test Case",
  "qTest Test Run"
]

Constraints

No Constraints

No constraints are defined

Code Block
"Constraints": []

Level 1 Approvers

Product Team Member

Code Block
"Levels": [
  {
    "Name": "Level 1",
    "Approvers": [
      "Product Team Member"
    ]
  }
]

Prevent Author Approval

TRUE

Code Block
"Prevent Author Approval": true

...

View file
nameVeraAPTutorial-part2.json

Vera configuration verification

Next let’s verify our configuration changes by importing Test Cases and Routing the Test cases for approval

...