Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Include Page
apache-felix-ipojo-header
apache-felix-ipojo-header

HTML

<div class="content">

JUnit4OSGi : Executing Unitary and Integration Test on OSGi

This page is deprecated

...

Goals

Executing tests on OSGi became a stringent requirement as several aspects need to be tested. Indeed, modularity, services (and the inherent dynamism) and the business logic need to be tested. The goal of JUnit4OSGi is to provide an execution gateway in order to test bundles and services. Instead of injecting mock objects, as provided by regular test frameworks to hide the underlying Executing environment, tests are directly executed on OSGi and so have access to all the features provided by the OSGi framework. This allows developers checking modularity aspect and service dynamism in addition to the business logic.

Principles

Junit4OSGi is split in several pieces. First the core bundle (Junit4OSGi) contains an extended version of Junit (3.8.1). On the top of this framework, several runners are implemented:

...

  • Compile the tests and create the bundle by launching ant from the junit-osgi-example directory
  • Start Felix
  • Deploy the bundle with the following command: start file:../junit-osgi-example/output/junit-osgi-example.jar
  • Execute the test by using the junit command

Maven front end: automating tests in your build process

Coming soon

Include Page
apache-felix-ipojo-footer
apache-felix-ipojo-footer