4. Simple Testing
• You need the camel-test module
• Your test should extend the CamelTestSupport class and…
• Typically you will need to override the createRouteBuilder() method
• JNDI Registry
http://camel.apache.org/camel-test.html
10. Spring Testing
• You need the camel-test-spring module
• Use the @RunWith(SpringJUnit4ClassRunner.class) annotation
• Provide your configuration using an XML file…
– src/test/java/org/istabg/camel/examples/SpringFilterTest.java
– src/test/java/org/istabg/camel/examples/SpringFilterTest-context.xml
• or use the Java DSL with a configuration loader
http://camel.apache.org/spring-testing.html
12. Blueprint Testing
• You need the camel-test-blueprint module
• Your test should extend the CamelBlueprintTestSupport class and…
• Specify the Blueprint descriptor location
http://camel.apache.org/blueprint-
14. Testing Endpoints
• Mock – Allows assertions to be added to an endpoint.
• Test – Pulls expected message bodies from an endpoint, e.g. file.
• DataSet – Used for load & soak testing.