Hi JS,

James pointed out that ContextTestSupport is actually available in the camel-core test-jar: "most [camel] modules include in the pom.xml the test-jar for camel-core (or camel-spring) to reuse ContextTestSupport which is a handy base class for booting up a context, defining some rules and providing a ton of helper methods".

You might find this useful too: http://activemq.apache.org/camel/mock.html (linked from http://activemq.apache.org/camel/cookbook.html). You will find lots of examples in the camel tests.

For running tests using Spring, you may want to use the SpringTestSupport class from the camel-spring component.

Cheers,
Hadrian


jsbournival wrote:
Hello,

I'm a little stuck.  I want to test a Camel app using TestNG.  But I can't
figure out how to structure my stuff:

-  First, I want to start the CamelContext via the Spring Context I have in
my webapp (/WEB-INF/context.xml)

-  Then I want to be able to fire messages to various endpoints ... but I
can't find doc on this.

Testing is a priority on our future project, so this one is important and I
want to set it up right.

Thank you for your answers,

JS.


Reply via email to