After you create a Pega unit test case for a decision table or decision tree, the
system generates a decision result assertion. This assertion displays the input values used to
test the rule and the result generated by the rule, as provided in the Decision
result section in the Run Rule dialog box.
Note: This assertion is supported on when rules, decision tables, and decision trees
only.
You can modify the input values and the default decision result by completing the following
steps:
-
Complete one of the following actions:
- If the Pega unit test case is not already open, open the case and select the Definition tab.
- If the Pega unit test case is open and has not been saved, then
click Done on the Definitions
tab.
- Optional:
Add either multiple input values and results to the assertion, or add other
assertions.
Note:
-
You can add multiple input values and results to this assertion but cannot add
other assertion types to this test case.
-
You can add other assertion types to this test case only if you have a single
input and result entry for the assertion.
Complete one of the following actions:
-
Save the rule form.
The test case runs the decision tree or decision table with each input combination and
compares the result with the expected decision result for that combination.
It then either runs other decision result combinations or other assertions that are
configured. If the expected result of any of the input combinations in the decision
result assertion does not match the result that the rule returns, the assertion
fails.