camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadrian Zbarcea <>
Subject Re: Testing Camel App w/ Spring
Date Tue, 27 Nov 2007 03:54:03 GMT
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: (linked from  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.


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.

View raw message