Unit Testing Modes
The following tables provide a detailed explanation of the various testing modes available for configuring the unit test cases.
For Activities with output (example mapper and RESTInvoke):
Option | Description |
---|---|
Execute (Default) |
This is the default mode for all activities. When an activity is set to this mode, it runs as per the definition and configuration and does not have any effect in the unit test execution. You can use this option to reset your unit test configurations on the activity. |
Assert on Outputs |
Adds an assertion for flow output. For more information, see Creating Assertions for Flow Output. |
Assert on Error |
Adds an assertion for the flow designed in the error handler. Unit test case designed for the error handler flow is run to detect any run time exceptions or errors in the flow implementation. For more information, see Creating Assertions for the Error Handler. |
Mock Outputs |
Use mock data for the activities that have an output. For more information, see Using Mock Data. |
Mock Error | Use mock exceptions for an activity to find out whether the exception handling is being done correctly. |
For activities without output (example LogMessage):
Option | Description |
---|---|
Execute (Default) |
This is the default mode for all activities. When an activity is set to this mode, it runs as per the definition and configuration and does not have any effect in the unit test execution. You can use this option to reset your unit test configurations on the activity. |
Assert on Error |
Adds an assertion for the flow designed in the error handler. Unit test case designed for the error handler flow is run to detect any run time exceptions or errors in the flow implementation. For more information, see Creating Assertions for the Error Handler. |
Mock Error | Use mock exceptions for an activity to find out whether the exception handling is being done correctly. |
Skip Execution |
Skip an activity in unit testing if the activity does not have any output. For example, you can skip activities such as Sleep, eFTL Publish message, or StartaSubFlow.
Note: To skip an activity with an output, you can mock it without any configuration data. For activities that do not have an output, you can select Skip Execution.
|