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.- In the navigation pane of Dev Studio, click , and then click the map value that you want to test.
- Click .
- In the Test Page pane, select the context and test page to use
for the test:
- 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.
- To discard all previous test results and start from a blank test page, click Reset Page.
- 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.
- Enter sample values to use for required parameters in the Results pane and then click Run Again.
- Optional: To view the pages that are generated by the unit test, click Show Clipboard.
- To convert the test into a Pega unit test case, click Convert to Test. For more information, see Creating unit test cases for rules.
- Optional: To view the row that produced the test result, click a Result Decision Paths link.
Previous topic More about Map Values Next topic Configuring rows and columns in a map value