OSGi Testing

前端 未结 13 1056
执念已碎
执念已碎 2021-02-04 05:25

Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable.

We\'re usin

13条回答
  •  死守一世寂寞
    2021-02-04 06:02

    Here are some tools not mentioned yet:

    • I'm using Tycho, which is a tool for using Maven to build Eclipse plugins. If you create tests inside their own plug-ins, or plug-in fragments, Tycho can run each set of tests inside its own OSGi instance, with all its required dependencies. Intro and further info. This is working quite well for me.

    • jUnit4OSGI looks straightforward. You make subclasses of OSGiTestCase, and you get methods like getServiceReference(), etc.

    • Pluginbuilder, a headless build system for OSGi bundles / Eclipse plug-ins, has a test-running framework called Autotestsuite. It runs the tests in the context of the OSGi environment, after the build step. But, it doesn't seem to have been maintained for several years. I think that many Eclipse projects are migrating from Pluginbuilder to Tycho.

    • Another option is to start an instance of an OSGi container within your unit test, which you run directly, as explained here.

    • Here's someone who's written a small bundle test collector, which searches for JUnit (3) tests and runs them.

提交回复
热议问题