Creating Assertions
To compare the actual and expected output, you can add multiple assertions on an activity, a flow output, or an error handler . The assertion expression always evaluates to a boolean value.
To add unit test assertions for a test case, perform the following steps:
- Procedure
- On the Unit Test page, select one of the flows 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.
- On the I want to dropdown menu, select one of the following assertions:
Assert on Outputs
Assert on Error
Note: The assertion types in the dropdown menu are based on the configuration of the selected activity. - Click New Assertion to create one with a default name.
- Map the Available Data from assertions dialog with the appropriate values and click Save.
When asserting an object, it is a best practice to assert each property individually instead of the entire object.
You cannot save changes if you delete all assertions. To remove all existing assertions, select a different mode on the I want to dropdown menu.