You can configure assertions to compare the number of items returned in a page list, page group, value list, or value group on the rule to the result that you expect to see on the clipboard.
If you have not saved the PegaUnit test case, click Cancel or Done to open the Definition tab.
Open the PegaUnit test case if it is not already open and then click the Definition tab.
If the automated test case is open, click the Definition tab.
Complete one of the following steps:
To add a new assertion, Add expected result at the bottom of the page.
Modify an existing assertion in the pane.
For activities and data transforms, complete the following tasks:
In the Page class field, select the class to which the page belongs.
In the of object field, enter the path of the object with which the results are compared or counted against during the assertion.
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.
Select the appropriate comparator from the Comparator list.
In the Value field, enter the value that you want to compare with the object.
Optional: To add a comment, click the Add comment icon, enter a comment, and click OK.
Click Save.
The assertion fails if the expected value does not match the length of the page list, page group, value list, or value group.