You are here: Record management > Rule and application testing > PegaUnit testing > Configuring list assertions

Configuring list assertions

You can create list assertions for page lists on a rule to determine if either the expected result is anywhere in the list of results returned by the rule. Even if the order of results changes, the test will continue to work.

You can configure list assertions for page lists on a rule to apply assertions to all the results that are returned by the rule. Configure an ordered list assertion so that you do not have to manually input assertions for each result in the list.

  1. Complete one of the following steps.

  2. Complete one of the following actions:

  3. From the Assertion type list, select List.

  4. Optional: If you are configuring a property assertion for data transforms or activities, you can specify the page that has the properties that you want to add.

  5. Add properties to the assertion.

  6. Optional: In the Filter field, enter a property and value on which to filter results or open the Expression Builder by clicking the Gear icon to provide an expression that is used to filter results. The list assertion applies only to the page list entries that are specified for this filter value.

  7. From the Comparator list, select the comparator that you want to use to compare the property with a specified value.

  8. In the Value field, either enter a value with which to compare the property or open the Expression Builder by clicking the Gear icon to enter an expression that is used to provide the value.

  9. Note: The Gear icon does not appear until after you have saved the rule form.

  10. To add a comment, click the Add comment icon, enter a comment, and click OK.

  11. If you are adding properties using the property panel, click Done.

  12. Click Save in the rule form.

When you run the test case, the system searches for the specified properties in the page list. One of the following occurs: