About Test Case rules |
New | Inputs | Results | History |
The Run Rule option enables you to test a rule by itself before testing it in the context of the entire application you are building. When Automated Testing is enabled, you can save the test data you used for certain rule types as test case rules. Then, the next time you test that rule, you can run the test case rather than entering the test data again.
When Automated Testing is enabled, you can use the Run Rule window to create test cases for the following rule types:
Test case rules contain both the test data and the results of that data. When you run a test case, Process Commander uses the saved test data when running the rule and then compares the results to those saved in the test case. If the results do not match, investigate the tested rule to see what changed and determine whether there is a problem.
The key to a test case rule includes the pxInsName of the rule it tests. If a tested rule is qualified by circumstance or time, create separate test cases for each circumstance.
When you have more than one test case that you want to run together or if you want to run a test case in the background, create a unit test suite rule and then use the Test Manager portal to schedule the suite. See About Unit Test Suite rules and these Pega Developer Network articles:
When your requestor holds the AutomatedTesting privilege, you can create test cases from the Run Rule window of decision table, decision tree, flow, and SOAP service rules. For information about how to enable this feature, see the Pega Developer Network article PRKB-25094 How to enable Automated Testing.
When testing a decision table, decision tree, flow or SOAP service rule, the test cases created for that rule appears in a list in the Run Rule window. Additionally, you add test cases to unit test suite rules.
Test case rules are instances of the Rule-AutoTest-Case class. They belong to the SysAdmin category.