You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by TonyDrago <do...@yahoo.co.uk> on 2006/07/10 22:12:22 UTC
unit testing JBI components
Hi,
I want to write JUnit test methods for my components. This requires me to do
the following:
1) Launch ServiceMix from within a JUnit class
2) Send a message to a component from a JUnit method
3) Retrieve the component's response from a JUnit method
I guess I could achieve (1) simply by executing:
Runtime.exec(pathToServiceMix);
Thread.sleep(enoughTimeForServiceMixToStart);
But I'm not too sure about (2) and (3).
I believe there are binding components provided with ServiceMix which might
be useful, but I'm looking for specific information about how to use these
to send/receive messages to/from JBI from a JUnit method.
Any alternative suggestions about how to unit test components would be most
welcome.
Best Wishes,
Tony
--
View this message in context: http://www.nabble.com/unit-testing-JBI-components-tf1920532.html#a5258236
Sent from the ServiceMix - User forum at Nabble.com.
Re: unit testing JBI components
Posted by Terry Cox <te...@meta-concepts.com>.
> I want to write JUnit test methods for my components. This requires
> me to do the following:
There are plenty of examples of unit testing JBI components within the
ServiceMix source. servicemix-eip is a good place to start...
Terry