Include Page | ||||
---|---|---|---|---|
|
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:
...
Except if you use the maven front end (automating the launch a an OSGi framework (Felix) and deploying required bundles), to launch the Junit framework you need to deploy and start
- iPOJO 0.8.0-SNASPHOT TODO link
- iPOJO Extender Pattern Handler 0.8.0-SNAPSHOT TODO link
- The Junit4OSGi bundle TODO link
- One runner such as the Felix command one
The archive available HERE here contains a pre-configured versionof version of Felix with the previously mentionned bundles.
...
- 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 | ||||
---|---|---|---|---|
|