Unit testing a map value

You can test a map value individually, before testing it in the context of the application that you are developing. Additionally, you can convert the test run to a Pega unit test case. Testing a map value involves specifying a test page for the rule to use, providing sample values for required parameters, running the rule, and then examining the test results.
  1. In the navigation pane of Dev Studio, click Records > Decision > Map Value, and then click the map value that you want to test.
  2. Click Actions > Run.
  3. In the Test Page pane, select the context and test page to use for the test:
    1. In the Data Context list, click the thread in which you want to run the rule. If a test page exists for the thread, then it is listed and is used for creating the test page.
    2. To discard all previous test results and start from a blank test page, click Reset Page.
    3. To apply a data transform to the values on the test page, click the data transform link, and then select the data transform you want to use.
  4. Enter sample values to use for required parameters in the Results pane and then click Run Again.
    Result: The value that you enter and the result that is returned are the values that are used for the default decision result assertion that is generated when you convert this test to a test case.
  5. Optional: To view the pages that are generated by the unit test, click Show Clipboard.
  6. To convert the test into a Pega unit test case, click Convert to Test. For more information, see Configuring Pega unit test cases.
  7. Optional: To view the row that produced the test result, click a Result Decision Paths link.