Using Docker, Scala and Akka for integration tests

8th December 2014 in London at Business Design Centre

There are 54 other SkillsCasts available from Scala eXchange 2014

Please log in to watch this conference skillscast.

499571423 640

Developing a distributed application presents many challenges and one of the biggest is integration testing. While we have many tools at our fingertips for tackling unit tests integration tests are run manually within many projects. Most of the time this is because an integration test requires a number of containers to configured and started so that the individual pieces of the application can connect to each other. One of our recent customer projects is a retail application based on OSGi and built upon Karaf, Active MQ and Camel. Application specific bundles are written in Java and the more recent ones in Scala. The overall application consists of several container types and each type is configured with a set of bundles fulfilling a certain task. Some containers are deployed in the data-center, and each shop has at least one container handling the remote data transfer operations.

The challenge in that scenario is to test all the containers in collaboration and do so in a nightly build without any human interaction.

The presentation details how we have overcome the challenges

  • by packaging all the containers within docker images throughout the build process
  • by creating a test framework based on docker-java, Scala, Akka and Scalatest
  • by integrating the individual pieces within our maven based build process

The combination of the technologies mentioned above allow us to execute the entire integration test suite over night against the latest, automatically generated docker images.

All framework source is available on Github.


Thanks to our sponsors

Using Docker, Scala and Akka for integration tests

Andreas Gies

Andreas is Founder and Lead consultant at the Way of Quality GmbH in Germany. His focus is on distributed applications where he applies a range of technologies. Lately he is working on transitioning a Java based OSGi application to Scala and Akka.