Adding Mocking Support for Activities
This document provides steps for adding mocking support for BW activities in
TIBCO ActiveMatrix BusinessWorks™ with the Maven Plugin. User can skip execution of activity (usually activities that are based on external service) whose process is under Unit Testing. Mocking support functionality is required mainly for the
ActiveMatrix BusinessWorks™ activities that are based or dependent on some external Cloud Service or Database systems which are eventually under Unit Testing. To execute Unit Testing successfully on processes that contain the
ActiveMatrix BusinessWorks activities, we need to mock the
ActiveMatrix BusinessWorks activities. Now a dummy output can be added to mock activities that can be used in Unit testing for successful execution. Currently, Mocking Feature doesn't support the main process - they only mock the activities from sub-processes.
Prerequisites
-
Apache Maven:
https://maven.apache.org/download.cgi -
BusinessWorks Maven Plugin with version 2.2.0 should be installed. Please download the BW6-Maven-Plugin 2.2.0 from here:
https://github.com/TIBCOSoftware/bw6-plugin-maven/releases - Activities to be mocked should be present in sub-process where sub-process should be under Unit testing.
- Generate valid Mock Output XML file. For more information on generating the mock output file, see Generating Mock Output File.
Make sure the demo project with the subprocess that has the activities to be mocked is created.
To add mock output to an activity in TIBCO ActiveMatrix BusinessWorks™, follow these steps:
Procedure
Copyright © Cloud Software Group, Inc. All rights reserved.