JUNIT Tests for OSB services
-
14-09-2020 - |
Question
Can we have Junit Test cases for testing Proxy, Business Services in Oracle Service Bus? If yes can someone give me some pointers to the same.
Solution
this can be done by creating test suites to put and get messages from the queue and having your proxy do the transformation. The transformed output can then be compared with the expected out by simple string comparison.
OTHER TIPS
JUnits can also be written for any type of proxy not only queue based proxies.
If your Testing technology has the ability to test Web Services or RESTful Services, then it can be applied to OSB Services.
Remember what Interface you define for the OSB Service is how you invoke it.
So if it is a REST-based interface then you will make REST Calls, if it has a SOAP-Based interface then you will Make SOAP Calls i.e. SOAP Request Messages.
In terms of Assertions, same applies just like Web and REST Service:
- Response Status Code
- Response Message Body (usually XML for SOAP and JSON for REST)