Unit testing individual rules
An incorrect rule configuration in an application can cause delays in case processing. To avoid configuration errors such as incorrectly routed assignments, unit test individual rules as you develop them.
You unit test rules from a rule form. The appearance of the Run Rule window varies across rule types, so how you run a rule varies by its type.
In general, you complete the following tasks:
- Specify whether to create a test page, or, if any pages of the appropriate class already exist on the clipboard, to copy one.
- Select a data transform to use when Pega Platform creates a test page.
- For services, specify whether the service rule is to run in your session or as a newly created service requestor. If the service is configured to run as an authenticated user, you are prompted for a user name and password.
- Provide test data to use when the rule runs.
When you run the rule, the system uses rule resolution. If you unit test a rule, and there is a higher version of the rule, the system displays a status message stating it runs the higher version.
To test a circumstance rule, ensure that the circumstances are correct for the rule. Otherwise, the system tests the base rule.
For some rule types, such as binary file rules, Pega Platform does not provide an option for unit testing.