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.
In the code itself there would be a block called UnitTest1 Stage and inside a condition:
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?
- Related Post :
- [Google Drive] – UnitTest embedded in the Oracle OSB code
- [Indowebster] – UnitTest embedded in the Oracle OSB code
- [Mediafire] – UnitTest embedded in the Oracle OSB code
- [Zippyshare] – UnitTest embedded in the Oracle OSB code
- [Embedupload] – UnitTest embedded in the Oracle OSB code
- [Torrent] – UnitTest embedded in the Oracle OSB code