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.
-
Apache Maven: https://maven.apache.org/download.cgi
- Service Binding to be mocked must be present in a process under Unit testing.
- Generate valid Mock Input file. For more information on generating the mock input file, see Generating Mock Input File.
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
- Right-click 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.
- Select the process or subprocess having the service to be mocked.
- 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.
- 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.