Unit testing of rules
You can test a rule with test data that you provide by clicking Actions > Run in the rule form toolbar.
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 click the Run button, but there is a higher version of the rule, the system displays a status message stating it will run the higher version.
To test a circumstance rule, ensure that the circumstances are correct for the rule. Otherwise, the base rule is run.
Select topics in the following list for information about how to unit test rules of specific types: