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.

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, perform the following steps:

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

  2. 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.
  3. Click New Assertion to create one with a default name.
  4. Map the Available Data from assertions dialog with the appropriate values and click Save.
Note:  
  • 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.