2

Does anyone have any opinions on how TDD and UNIT testing would would when developing web services using Oracle Service Bus? All I can think of is stubbing out the back ends then running tests through the service bus, but that's really just integration testing. How would I apply TDD principles in this instance?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
irishguy
  • 671
  • 1
  • 9
  • 24
  • 1
    It's hard to give a good answer as the details are lacking a bit. What are you trying to accomplish? – bcarlso Feb 01 '11 at 15:33
  • And what about Oracle Services Bus makes this a special case vs. using TDD for developing web services? Or even application of TDD in general? I would also recommend you look at BDD. Might be more applicable here. – Jordan Dea-Mattson Feb 16 '11 at 22:56

1 Answers1

3

Is your question actually how best to conduct unit tests on Oracle Service Bus components? I have the same issue but have come to the view that now your unit of code is not a Java method or a class but a whole proxy.

It does however limit you to being only able, at best, to conduct component integration testing as you have described: Stubbing out the other systems and running what you'd traditionally call Integration tests through the Service Bus.

Scale up your unit of work.

If there is a better way to automate and test these code artifacts then I want to hear about it.

mez.pahlan
  • 1,053
  • 2
  • 11
  • 25
  • 1
    This is what I ended up doing. You can unit test the components in the OSB, but you have to change to configuration to be able to do this which invalidates your tests. We were looking at unit testing the XPATH/XQUERY and then running integration testing on the OSB. Have you come accross anyway of automatically deploying OSB configuration as part of a maven build? – irishguy Feb 17 '11 at 09:52
  • 1
    We use an ANT build process, but I'm sure whatever you can do in ANT you can do in MAVEN. By deploying configuration do you mean dynamically changing endpoints? Or transport types? We do change the transport typ by deploying customisation files. But We can't currently change the transport type. Which would be useful if you consider changing your input and output of each service to JMS and then using SOAPUI to unit test them. Then switching them back and again using SOAPUI for a component integration test through the bus? Sorry that hasn't helped. Would be interested in your progress. – mez.pahlan Feb 17 '11 at 10:37