Pega unit testing
You can use Pega unit testing to automate the testing of rules. After you develop rules, you can test them and then convert the test runs to Pega unit test cases to validate application data by comparing expected output to the actual output returned by running the rules.
For example, an account executive wants to ensure that a 10% discount is applied to all VIP customers. You can create a test case that verifies that this discount is applied to all VIP customers in the database. If the test does not pass, the results indicate where the 10% discount is not applied.
You can use Pega unit rule testing on the following types of rules:
- Case types
- Data pages
- Data transforms
- Decision tables
- Decision trees
- When (available beginning with Pega 7.3.1)
You can use one or more data pages, data transforms, or activities to set up the clipboard data before running the rule as part of the test case. You can also use activities to create any required test data such as work or data objects. After you run a Pega unit test case or test suite, data pages used to set up the test environment are automatically removed. You can also apply additional data transforms or activities to remove other pages or information on the clipboard.
You can also use the Execute Tests service, which is run by a continuous integration (CI) tool, to run all the Pega unit test cases in your application to validate the quality of your code after every build is created.
71% found this useful