Unit testing a data page

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

  1. Open a data page by clicking Records > Data Model > Data Page and selecting the data page that you want to open.
  2. Click Actions > Run.
  3. From the Thread list in the Run context pane, select the thread in which you want to run the rule.
  4. In the main test page, enter values for parameters, if any, to pass to the rule.
  5. Select the Flush all instances of this data page before execution check box to delete any existing instances of the selected data page.
  6. Click Run.
  7. Optional: To convert the test into an Pega unit test case, which you can use o validate application data in a continuous delivery environment, do the following tasks:
    1. Click Convert to Test. A new tab is displayed in the main Dev Studio window.
    2. Configure the Pega unit test case.
      See Configuring Pega unit test cases for more information.
  8. Optional: Click Show Clipboard to open the Clipboard and examine the pages that are generated by the unit test.
  9. Optional: If the rule has errors, click Trace to debug the rule with the Tracer tool.