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.

Note: You cannot create assertions for the activities that do not return output. Similarly, you cannot create assertions for the flow output when it has no outputs.

To add unit test assertions for a test case:

    Procedure
  1. 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.

  2. 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.
  3. Click New Assertion or icon to create an assertion. An assertion with the default name is created.

  4. Map the data from the Available Data section to the appropriate values and click Save.
Note:
  • 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.