Hello,
I have a few tests to check my Camel routes that when run using the
SpringJUnit4ClassRunner work just fine. However, I want to test some routes
of my application with Cucumber (basically something similar to JUnit). This
requires me to use another TestRunner (Cucumber.class). When trying to call
my tests from a Cucumber stack, the class that extends
CamelSpringTestSupport will not set any form of context. It just skips
createApplicationContext(). I am still able to access beans though.

What I now did as an ugly fix was to set the context manually.

this.context = new
ClassPathXmlApplicationContext("classpath:context.xml").getBean("camelContext");

I can now send something to endpoints, can access beans and whatnot. But the
assertion of expectedMessages at my MockEndpoint still always fails. 

Is there something else that I manually have to recreate when extending
CamelSpringTestSupport and I cannot use the SpringJUnitClassRunner?

Thankful for any hints,
Cheers



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-test-routes-when-using-another-TestRunner-tp5772687.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to