You are here: Reference > Rule types > Data Page Unit Test Case rules 

Data Page Unit Test Case rules
 

 
  1. About 
  2. Definition 
  3. History 

 

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 the PDN article Automated Data Page Testing: Application Setup.

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 the View details button to viewmore details about the latest result.

When you add new rules, you need to add the test case rules to a ruleset. That ruleset has to be 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 the View previous runs button 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.

Data pages that reference certain system pages may not be tested using unit test case rules because running such tests may lead to inconsistent test results.

Where referenced

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, select Data Model > Data Page and click on the name of a data page. From the data page record detail, click the Test cases tab.

Access

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.

Class

A Unit Test Case rule is an instance of the Rule-Test-Unit-Case class.

Related Topics Link IconRelated information