- In the navigation pane of Dev Studio, click , and then select the activity that you want to open.
- Click .
- In the Run context pane, select the thread, test page, and data
transform you want to use for the test.
- In the Thread list, select the thread in which you want to run the rule.
- In the Page list, select whether to copy parameter values
from an existing page or to create an empty page:
To use parameter values from an existing clipboard page in the selected thread, click Copy existing page, and then select the page you want to copy.
To start from a page containing no parameter values, click Empty test page.
- Optional: To apply a data transform, select the Apply data transform
check box, and then select the transform to apply.
Note: The system always runs the rule instance on the RunRecordPrimaryPage, regardless of the page that you select from this list. If you convert this test run to a test case and the RunRecordPrimaryPage requires initial values, then configure the clipboard so that it populates the page with initial values. For more information, see Setting up your test environment.
- Optional: To change the values that are passed to the rule, provide the new values on the main test page.
- Click Run to run the test.
- To convert the test run into a Pega unit test case, click Convert to test, and then configure the test case. For more information, see Creating unit test cases for rules.
- Optional: If the rule has errors, then click Trace to debug it using the Tracer tool. For more information, see Application debugging using the Tracer tool.
- Clipboard contents created from activity unit tests
When you test activities with the Run Rule feature, the system might create one or more clipboard pages, including copies of the named pages that you specified in the Run dialog box. The system retains these pages when you close the dialog box; properties on these pages remain available for you to use when you perform subsequent testing of this or other rules with the Run Rule feature.
- Testing an activity in context
If the activity requires extensive setup and is more appropriately tested in context rather than through unit testing, you can trigger the Tracer to start only when the activity is reached.