-
Notifications
You must be signed in to change notification settings - Fork 80
Steps to Add Mock Input to the Operation from SOAP REST
This document explains the steps for adding the Mock Input to the Operation from SOAP/REST Service with BusinessWorks 6.8.0 with the Maven Plugin 2.9.0. When user want to test the activities from SOAP/REST service process then they need to mock the REST or SOAP service operation. In order to mock Service Binding User need to mock the respective operation. Once User mocked the respective operation, corresponding JOB flow will get executed with mock input while running the test case. If Service has multiple operation then for each operation user will create test file and will add mock input accordingly to test the each flow associated with Operation
• Apche Maven: https://maven.apache.org/download.cgi
• BusinessWorks Maven Plugin with version 2.9.0 should be installed. Please download the BW6-Maven-Plugin 2.9.0 from here: https://github.com/TIBCOSoftware/bw6-plugin-maven/releases
• Process Starter to be mocked should be present in Process which is under Unit testing.
• Generate valid Mock Input XML file. Please refer to the Mock Input File Generation section to generate the Mock Input file.
This section assumes that you have already created the demo project which has the Service to be mocked.
- Right-click on module project and select New->Tests Folder. This will add the "Tests" folder in the module project.
- Right-click on the Tests folder in Project Explorer and choose New -> Add Test File. Change the Test File name if needed and hit Next which will show the wizard with a list of Processes. Select the process having the Service to be mocked.
- Right-click on the Operation to mock and select an option "Add Input".
- New "Tests " tab will be added in property section of activity which will have the "Input XML File" option to select the path of mock Input xml file
-
Run the application in debug mode from the Business studio.
-
Right click on "All" tab from the Job Data for "OnMessageStart" and select option "Select All"
-
Select "Copy Variables" option after "Select All" option.
- Paste the copied data into the XML file
Getting started
- Steps to Mavenize BW Application
- Building applications for BWCE
- EAR deployment with Config File
- Shared Modules with Maven
- Add Process Diagram in EAR
- BW Design Utility Goals
- CI/CD using Jenkins
- Custom XPath Function
- Deploy Shared Module on Remote Repository
- TCI Deployment using Maven Plugin
Unit Testing
- Primitive Assertion
- Activity Assertion
- Activity Assertion with Gold Input File
- Mock Output
- Mock Fault
- Test Suite
- Plugin Properties
Help & Contribute