O'Reilly logo

Apache Karaf Cookbook by Heath Kesler, Johan Edstrom, Jamie Goodyear, Achim Nierbeck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up a Pax Exam test environment

This recipe will guide you through the basic setup of a Pax Exam test environment using the Felix framework as the core OSGi container. The next recipe will cover how to combine Pax Exam and Apache Karaf.

How to do it…

To perform integration tests with Pax Exam, the POM configuration is essential, since it is already part of the build environment. For example, use the pax-exam-container-native artifact and of course it is mandatory to connect JUnit with Pax Exam. This can be done as follows:

… <properties> <version.pax-exam>3.4.0</version.pax-exam> <junit.version>4.11</junit.version> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required