Painless OSGi Integration Testing

In-Container Testing for OSGi

This space documents Pax Exam 2.x. It will no longer be updated.

There is a separate space for the current release line Pax Exam 3.x.

OSGi Testing with Pax Exam 2.x

  • Pax Exam lets you take control of the OSGi framework, the test framework (e.g. JUnit) and your system under test at the same time.
  • Pax Exam has a test driver and a test container. The driver launches the OSGi framework and the system under test. It builds on-the-fly bundles from your test cases and injects them into the container. The driver is a plain old Java application and does not itself require an OSGi framework.
  • The test container comes in multiple flavours: With the Pax Runner Container, the system under test runs in a separate Java virtual machine under remote control from the test driver. The Native Container launches an embedded OSGi framework in the test driver VM.
  • Test containers support different strategies for restarting or reusing the running OSGi framework for each test.
  • With Pax Exam's JUnit4TestRunner, you simply need to add some special annotations and a configuration method to a JUnit class to run your OSGi tests. Thanks to this runner, any JUnit integration (e.g. in Eclipse or Maven Surefire) works with Pax Exam out of the box.
  • Pax Exam itself is distributed as Maven artifacts and lets you provision Maven bundles to your OSGi framework directly from local or remote Maven repositories.
  • Pax Exam supports all major OSGi frameworks (Equinox, Felix, Knopflerfish) and lets you configure the combinations of framework vendors and versions for running your tests.
  • Pax Exam 2.x is the stable release line. The current release is Pax Exam 2.6.0.
  • Read more: Getting Started with OSGi Tests

Download 

Documentation

Issue Tracker

Latest News