There are two options (that I know of) for running automated tests inside an OSGi container:

junit4osgi: http://felix.apache.org/site/apache-felix-ipojo-junit4osgi.html
pax:exam: http://wiki.ops4j.org/display/paxexam/Pax+Exam

Each have their pros and cons. junit4osgi is the simpler/easier of the two, but only supports the felix framework (afaik) and doesn't support some more advanced OSGi features like extension bundles (or at least it didn't the last time I tried it). Also, it only supports writing your tests using JUnit3, and once you get those JUnit4 you never want to go back :)

Pax:exam on the other had is quite flexible and powerful. It supports all the major OSGi frameworks, and I haven't found an OSGi configuration it couldn't support. On the other hand it is very complex, and the documentation is a bit sketchy. When it's working it's awesome, when it doesn't work it can be infuriating.

Both have maven plugins that make running the tests from maven a cinch.

FWIW I'm using pax:exam, primarily because I need the flexibility and extension bundle support.

Kris


On Jan 12, 2010, at 1:48 PM, Roger Kitain wrote:

Kind of a newbie question..
We use GlassFish V3 which is OSGI (felix) based (there are a number of OSGI modules running when the server is started). I would like to write some tests to test the validity of OSGI bundles deployed to GlassFish V3. Can I do this - or, s the test framework
expecting to launch its own felix instance?

thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to