Use Unit Test Case rules to capture unit test cases for data pages in a Pega 7 Platform application. The test case contains the test criteria and expected results. Unit Test Case rules are created for Data Pages to enable the testing of a data page within an application.
Note: Before you can use data page unit test rules, your application must be configured properly for testing. See PDN article Automated data page testing: application setup for details about configuring your application for automated testing.
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. Click View details to view more details about the latest result.
You must add new unit test case rules to a test ruleset with the Use this ruleset to store test cases check box selected in the ruleset category tab under the Test automation settings.
Click view previous runs to open a new dialog box that displays the test date, the run time, expected run time, and whether the test passed or failed. Click the row of a test case to view detailed test results.
You should not use unit test case rules to test data pages that reference certain system pages because running such tests could lead to inconsistent test results.
Unit Test Case rules are referenced through Data pages. Existing data page unit tests are accessed on the Test cases tab of the Data page rule. In the Records Explorer, click Data Model > Data Page and click on the name of a data page. From the data page record detail, click the Test cases tab.
Use the Data explorer to view all available unit test rules.
Existing unit test case rules can be accessed on the Data page test case landing page.
A Unit Test Case rule is an instance of the Rule-Test-Unit-Case class.