You are here: Reference > Rule types > Data Page rules > Unit testing a data page

Unit testing a data page

You can test a data page individually before testing it in the context of the application that you are developing using the run rule feature. Optionally, you can convert the run into a PegaUnit test case.

  1. Open a data page by clicking Records > Data Model > Data Page and selecting the data page that you want to open.
  1. Select Actions > Run.

  2. Select the thread in which you want to run the rule from the Thread list in the Run context pane.

  3. In the main test page, enter values for parameters, if any, to pass to the rule.

  4. Select the Flush all instances of this data page before execution check box to delete any existing instances of the selected data page.

  5. Click Run.

  6. To convert the test into an unit test case, click Convert to Test. A new Create Test Case tab is displayed in the main Designer Studio window.

  7. Optional:Click Show Clipboard to open the Clipboard and examine the pages that are generated by the unit test For information, see Clipboard pages created by the Run Rule feature.

  8. Optional:Click Trace to debug the data page with the Tracer tool.