9 Replies Latest reply on Sep 16, 2009 2:47 AM by njiang

    Unit testing OSGi bundles within FUSE ESB 4

    frederic.conrotte

      Hello,

       

      First of all, let me tell you that I'm very impressed by FUSE ESB 4. To my knowledge it's one of the first (if not the first) integrated runtime server to provide OSGi programming for the developer. Congrats !

       

       

      I've been working a lot with OSGi runtimes and Spring DM for the past year. For example thru the Eclipse OFMP project:

      http://code.google.com/p/ofmp/source/browse/#svn/trunk/ofmp

       

      My experience is that it's great and exciting technology: modularity is a great benefit but the downside is of course that every module (OSGi bundle) is in itself an application.

       

      Every bundles has its own set of dependencies/versioning issues (which are manageable tought)

       

      The bottom line is that a full fledge "JUnit OSGi testing framework" has yet to come.

       

      There are basically 2 solutions so far:

      http://static.springsource.org/osgi/docs/1.2.0/reference/html/testing.html

      http://wiki.ops4j.org/display/paxexam/Pax+Exam

       

      I've just tested Spring DM's solution so far. With OSGi you quickly reach more than 100 bundles in your runtime. The problem is that every bundle under test has to maintain its own list of dependent bundles (with their proper version...) to install in the OSGi runtime before JUnit tests can be launched. That's harsh because dependencies tends to change overtime. Maintaining the list of test dependencies is a mess.

       

      I don't seen anything related to component testing in the doc:

      http://fusesource.com/docs/esb/4.1/osgi/index.html

       

      If FUSE has some hints/proposal for this common use case with FUSE ESB 4.1, I'd be glad to hear it

       

      Cheers

       

      Frederic

       

      Edited by: frederic.conrotte on Aug 12, 2009 3:27 PM