UnitTest embedded in the Oracle OSB code

I’m struggling to UnitTest OSB code as there is no real unit test framework to do that. Actually the only way to test an OSB service is to use SoapUI. The problem with OSB is that You can test the service using only the endpoint.

So my idea was to create in-line unit tests.
The code would contain conditional blocks and read the unit test key passed in the SoapUI request.

Something like:
UT1

In the code itself there would be a block called UnitTest1 Stage and inside a condition:

if(UT1) {
test it…
}

Example:

Keeping it like this makes it clean and its “separated” from the code logic.

Afterwards the SoapUI will read the response and check results using assertions. That Way I’m able to test all possible scenarios.

But the big question comes – should such code be run in production?

Because the choice is really limited here:

  • embedded unit tests fully automated with hudson or
  • no test at all (for the scenarios that are not testable using soap ui)

In my opinion is better to have it 100% tests so TDD could be used, automated regression would come in place, etc..

What do You think?


Download unittest.embedded.in.the.oracle.osb.code.zip
Direct Link


Download


Download unittest.embedded.in.the.oracle.osb.code.zip
Mediafire


Download


Download unittest.embedded.in.the.oracle.osb.code.zip
FILESMONSTER


Download


Download unittest.embedded.in.the.oracle.osb.code.zip
Kingfiles


Download


Download unittest.embedded.in.the.oracle.osb.code.zip
Uploaded


Download

Both comments and pings are currently closed.

Comments are closed.