Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Integration Testing In

...

Spring

It is very useful to be able to run integration tests of JBI artefacts being deployed within ServiceMix inside a JUnit test case either ran from inside your IDE or from inside the maven test run.

From . Form version 3.2 .2 onwards of ServiceMix you can accomplish this using a simple Spring.xml as follows...

...

For more details on this example, see the Camel Example.

Version resolving

In the example above you can see we just list the maven groupId and artifactId strings for the various JBI deployment artifacts (shared libraries, components, service assemblies etc). You can if you prefer specify the full file, or specify the explicit version number.

...

To ensure that the META-INF/maven/dependencies.properties files are all available and contain the dependency information for the Service Assemblies we recommend you write your integration test using a packaging of itest and enable the Maven JBI Maven Plugin in your pom.xml like the camel-sa-itest module does.

Examples

  • camel-sa-itest shows how to deploy a camel based SA/SU in servicemix via Spring
  • bridge-sa-itest shows how to deploy an SA in ServiceMix via Spring with an ActiveMQ broker deployed locally for the integration test along with some Camel routing rules to create initial message flows etc.