Adding Mock Fault to an Activity
This document provides steps to add Mock Fault for activities in ActiveMatrix BusinessWorks with the Maven Plug-in. You can also mock faults thrown by activities and test the exception handling logic, and test all the transitions.
- Apache Maven: https://maven.apache.org/download.cgi
- Activities to be mocked must be present in a process or subprocess included under Unit testing.
- Generate valid Mock Fault file. For more information on generating the mock fault file, see Generating Mock Fault File.
Make sure the demo project with the process or subprocess that has faults to be mocked, is created.
To add mock fault to an activity in ActiveMatrix BusinessWorks, follow these steps:
- Procedure
- Right-click on a module project and select
.
The Tests folder is added in the module project.

- In Project Explorer, right-click on the
Tests folder and choose
. If needed, change the name of the
Test file and click
Next.

The New Test File wizard with a list of process or subprocesses.

- Select the process or subprocess having the activities fault to be mocked.
- Right-click on the activity to mock fault and select the
Add Mock Fault To Activity option.

The new Tests tab is added in the Properties section of the activity.
- The new
Tests tab has file selector to select the mock fault file. Select the mock fault data file using file selector.
You can provide the relative mock fault file in the Mock Fault File field.

To run Unit Tests in TIBCO Business Studio for BusinessWorks, see Running Unit Tests in Studio.