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.
We need to update the Test Case Type Combo box list values by adding:
Data Migration
Configuration
System
Acceptance
We need to add a new Test Case custom field Regulation Combo box and add the following list values:
None
SOX
GxP
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 | ||
---|---|---|
|
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 | ||
---|---|---|
| ||
"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 |
| ||
Rank | 10 |
| ||
Record Type | 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.
| ||
Level 1 Approvers | Technical, Business, Data Owner |
| ||
Level 2 Approvers | Quality |
| ||
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 |
| ||
Rank | 20 |
| ||
Record Type | Test 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.
Note: The All Boolean constraint is the default constraint. | ||
Level 1 Approvers | Technical |
| ||
Level 2 Approvers | Quality |
| ||
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 |
| ||
Rank | 30 |
| ||
Record Type | Test 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.
Note: The All Boolean constraint is the default constraint. | ||
Level 1 Approvers | Technical, Business |
| ||
Level 2 Approvers | Quality |
| ||
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 |
| ||
Rank | 40 |
| ||
Record Type | Test 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.
Note: The All Boolean constraint is the default constraint. | ||
Level 1 Approvers | Business |
| ||
Level 2 Approvers | Quality |
| ||
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 |
| ||
Rank | 50 |
| ||
Record Type | Test 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.
Note: The All Boolean constraint is the default constraint. | ||
Level 1 Approvers | Product Team Member |
| ||
Level 2 Approvers | Product Lead |
| ||
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 |
| ||
Rank | 60 |
| ||
Record Type | Test 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.
Note: The All Boolean constraint is the default constraint. | ||
Level 1 Approvers | Technical, Business |
| ||
Level 2 Approvers | Product Lead |
| ||
Level 3 Approvers | Quality |
| ||
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 |
| ||
Rank | 70 |
| ||
Record Type | Test 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.
| ||
Level 1 Approvers | Technical, Technical |
| ||
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 |
| ||
Rank | 80 |
| ||
Record Type | Test 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.
Note: The All Boolean constraint is the default constraint. | ||
Level 1 Approvers | Product Team Member, Product Team Member |
| ||
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 |
| ||
Rank | 90 |
| ||
Record Type | Test 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.
Note: The All Boolean constraint is the default constraint. | ||
Level 1 Approvers | Business, Business |
| ||
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 |
| ||
Rank | 100 |
| ||
Record Type | Any | Add all record types
| ||
Constraints | No Constraints | No constraints are defined
| ||
Level 1 Approvers | Product Team Member |
| ||
Prevent Author Approval | TRUE |
|
...
View file | ||
---|---|---|
|
Vera configuration verification
Next let’s verify our configuration changes by importing Test Cases and Routing the Test cases for approval
...