-
1. Re: ESB Unit and Integration Tests
ryanhos Dec 23, 2008 9:45 AM (in response to ryanhos)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....
-
2. Re: ESB Unit and Integration Tests
beve Dec 23, 2008 10:05 AM (in response to ryanhos)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.
regards,
/Daniel -
3. Re: ESB Unit and Integration Tests
funkeymonkey Jun 30, 2011 4:45 AM (in response to beve)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.
Tim.
-
4. Re: ESB Unit and Integration Tests
tcunning Jun 30, 2011 1:34 PM (in response to funkeymonkey)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 :