Well, this is disappointing. 22 reads and not a single reply. There's plenty of help for the "pleez snd me teh codez" questions around here, but someone asks a question about good project practices and all I hear is crickets chirping....
someone asks a question about good project practices and all I hear is crickets chirping....
Sorry about this. We have been a lagging a bit since last week when we were all away and some post have been missed.
Take a look at org.jboss.soa.esb.testutils.AbstractTestRunner and org.jboss.soa.esb.listeners.gateway.JBRIntegratedUnitTest which should give you an idea of how you can test your action pipeline.
I am struggling with the same concept, all I can find is feature requests for unit testing JBOSS-ESB, but not examples. I have to build a new esb project and would appreciate any suggestions.
There are plenty of examples within the source of the project - from the ones that Daniel talks about, to integration level tests where the ESB is deployed to a server, a test is run, and the ESB is undeployed (see the qa/quickstarts directory, which unit tests the quickstarts by sending a message in, stores the result in a JMX MBean, and then tests the result). As Ryan said above, actions should be testable pretty easily as POJOs - testing services is where you probably need to do more heavyweight testing - whether it be using one of the utilities that Daniel described or testing within the appserver.
You can also take a look at Arquillian - there are a few limitations there (AS_CLIENT mode, etc) which Aslak spells out here, but it should work if you are looking for an in-container alternative :