Creating Assertions
To compare the actual vs expected output, you can add multiple assertions on an activity, flow output, or error handler. The assertion expression always evaluates to a boolean value.
To add unit test assertions for a test case:
- Procedure
-
On the Unit Test page, select one of the flows below to which you want to add an assertion:
-
Error Handler: On the Error Handler tab, click <Activity Name>.
-
Main Flow: On the Main Flow tab, click <Activity Name> or Flow Output.
The Unit Test Data Configuration dialog opens.
-
-
From the I want to dropdown, select one of the following assertions:
-
Assert on Outputs
-
Assert on Error
Note: The assertion types displayed in the dropdown are based on the configuration of the selected activity. -
-
Click New Assertion or
icon to create an assertion. An assertion with the default name is created.
- Map the data from the Available Data section to the appropriate values and click Save.
-
While asserting an object, it is recommended to assert each property individually rather than asserting the entire object.
-
You cannot save changes if you delete all assertions. To remove all existing assertions, select a different mode from the I want to dropdown.