Skip to main content


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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Unit testing a map value

Updated on April 5, 2022

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 RecordsDecisionMap Value, and then click the map value that you want to test.
  2. Click ActionsRun.
  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 Creating unit test cases for rules.
  7. Optional: To view the row that produced the test result, click a Result Decision Paths link.

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