Search code examples
apache-camelcode-coveragesonarqube

Camel and code coverage


Is there a code coverage/quality tool (like Sonar) that works well with Camel routes? I've been doing some analysis with sample builds of camel routes to find nothing registers inside of Sonar after running my junits through Jenkins.


Solution

  • The route DSL configures the Camel framework to run integrations.

    You need to know why you need code coverage reports out of your Camel apps and exactly what they should tell you.

    Camel routes can be written in a wide variety of ways. XML DSL, Groovy DSL, Java DSL etc.. Then even writing Java DSL, you may have the heavy logic inside expressions and scripts, such as simple/groovy/xslt.

    There is no way for any single tool to figure out that you have written perfect Java and XML and Groovy and Scala and XSLT and ... in a Camel/integration perspective.

    Define test cases and write decent integration/unit tests for your routes and use sonar for coverage of java processors/beans. That is straight forward.