Test Case rules
|
Because test cases exist only in the context of unit testing a specific rule, you initiate creation of a new test case rule by clicking the Record Test Case button from the Test Cases tab of the rule you want to unit test. After running your unit test, click the Save Test Case button. In the New form for the rule, you enter a name and a short description; the name that you enter is stored as the Purpose key part of the test case rule.
You must have the AutomatedTesting privilege to be able to create test case rules. For information about how to enable this privilege, see About Automated Unit Testing.
When stored, a test case rule has three key parts:
Field |
Description |
Class Name |
Read only. Set to the type of the rule this test case tests. For example, if the saved test case is for a decision tree, the system sets the Class Name to Rule-Declare-DecisionTree. |
InsName |
Read only. Set to the pxInsName value of the rule this test case tests. |
Purpose |
Set to the Test Case Name that is entered in the New window when the test case rule is saved. |
Create a separate RuleSet to hold test case and unit test suite rules rather than using a RuleSet version that will be moved to a production system. For more information, consult the articles in the Testing Applications category of the Pega Developer Network.
For general information about the New form, see Completing the New Rule dialog box.
As with most rule types, when you search for a test case, the system shows you only those rules that belong to a RuleSet and version that you have access to.
Test case rules are associated with a single tested rule (identified by the second key, InsName) and they cannot be qualified by time or circumstance.