Use Test Case rules to capture PegaUnit test cases for rules in a Pega 7 Platform application. The test case contains the test criteria and expected results.
The latest result for the test case is shown in the banner at the top of the page. The result displays whether the test succeeded or failed, when the test was last run, and the actual and expected run times.
You can complete the following tasks:
Edit test details such as the identifier and context including the ruleset and applies to class by clicking the Gear icon next to the test case.'
Modify the parameters, if any, that are sent to the test by clicking the Gear icon next to the parameters that were sent.
Modify the description of the test case.
Configure assertions (test conditions) to compare the expected output of the test with the actual test results.
Note: The Setup & Cleanup tab appears only when you create test cases in Designer Studio.
Apply additional data transforms or activities to clean up the clipboard in the Setup & Cleanup tab.
Notes:
Before you can create PegaUnit test rules, your application must be configured properly for testing. See Creating a test ruleset for details about configuring your application for automated testing.
You should not use test case rules to test data pages that reference certain system pages because running such tests could lead to inconsistent test results.
You can view all Test Case rules by selecting Designer Studio > Application > Automated Testing > Test Cases.
You can view Test Case rules for a specific rule type in the Test Cases tab.
Test case rules are referenced in the Test Cases tab of the rule for which they were created.
Click Actions > View Java to view the generated Java of a rule. You can use the Java code to debug your application or to examine how rules are implemented.
A Test Case rule is an instance of the Rule-Test-Unit-Case class.