You are here: Reference > Rule types > Test Case rules

Test Case rules

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:

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.

Access

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.

Where referenced

Test case rules are referenced in the Test Cases tab of the rule for which they were created.

Viewing the Java code of a rule

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.

Class

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