Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Unit testing a flow action

Updated on March 29, 2022

The Run Rule feature enables you to test a flow action individually before testing it in the context of the application you are developing. You specify a test page for the rule to use, provide sample data as the input, run the rule, and examine the results.

Before you begin

Before you begin, determine how you will provide the sample data to use when testing the rule. If possible, open a work item of the appropriate work type.

For general information about the Run Rule feature, including a list of the clipboard pages that are generated when a rule runs, see Unit testing individual rules.

Run the rule

To run the rule, complete the following steps:

  1. Save the rule.
  2. Complete any preprocessing necessary to create the appropriate clipboard context and, if the rule is circumstanced or time-qualified, to set the conditions you want to test.
  3. Click the Run toolbar button. The Run Rule window appears.
  4. In the Test Page section, specify which page to use as the main page. Do one of the following:
    • If any pages of the rule's Applies To class already exist, select one to be copied. (If this decision tree applies to an embedded page, identify a top-level page that contains the embedded page or pages and supply a Page Context.)
    • Otherwise, select Create or Reset Test page. Then, in the Apply field, select the data transform to use for the test page.
  5. If the rule being tested is circumstance-qualified, select Set circumstance properties to run exact version of rule.
  6. In the lower section of the Run Rule window, enter the test data and click Run Again. The system runs the decision tree and displays the results.
  7. Optional. Click Show Clipboard to open the Clipboard and examine the pages. Click the Hide Clipboard button to close the tool. For information about the clipboard pages that are generated, see Unit testing individual rules.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us