Adding Mock Support to SOAP and REST Service Binding

This document provides steps to add Mock Input to SOAP and REST Service Binding in TIBCO BusinessWorks Container Edition with the Maven Plug-in. To mock a Service Binding, mock the respective operation and then the corresponding job flow gets executed with mock input while running the test case. If a Service has multiple operation, a test file must be created for each operation and then add the mock input accordingly to test each flow associated with the operation.

Before you begin

Ensure the demo project which has the service to be mocked, is created.

To add mock input for service binding in TIBCO BusinessWorks Container Edition, follow these steps:

    Procedure
  1. Right-click a module project and select New > Tests Folder.
    The Tests folder is added in the module project.
  2. In Project Explorer, right-click on the Tests folder and choose New > Add Test File. If needed, change the name of the Test file and click Next.

  3. Select the process or subprocess having the service to be mocked.
  4. Right-click on the operation to mock and select the Add Input option.

    The new Tests tab is added in the Properties section of the activity.

  5. The new Tests tab has file selector to select the mock input file. Use the Input XML File field to select the mock input data file using the file selector.

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