Skip to main content

Table of Contents

Unit testing a data transform


Only available versions of this content are shown in the dropdown

You can use the Run Rule feature to test a data transform individually before testing it in the context of the application that you are developing. Additionally, you can convert the test run into a Pega unit test case.

  1. In the navigation pane of Dev Studio, click Records Data Model Data Transform , and then select the data transform that you want to open.

  2. Click Actions Run .

  3. In the Run context pane, select the thread, test page, and data transform you want to use for the test.

    1. In the Thread list, select the thread in which you want to run the rule.

    2. 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.

    3. Optional:

      To apply a data transform, select the Apply data transform check box, and then select the transform to apply.

      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.
  4. Optional:

    To change the values that are passed to the rule, provide the new values on the main test page.

  5. Click Run to run the test.

  6. 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.

  7. 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.

  8. Click Clipboard to open the Clipboard and examine the pages that are generated by the unit test. For more information, see Clipboard pages created by the Run Rule feature.

Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us