Announcement Announcement Module
Collapse
No announcement yet.
OSGi Integration testing with DM Server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OSGi Integration testing with DM Server

    Greetings!
    I want to implement OSGi Integration test for my dynamic bundle with DM Server. I read docs about integration testing in OSGi and do that as suggested: extended AbstractConfigurableBundleCreatorTests, defined getTestBundlesNames, defined getSettingsLocation to bundle.properties where specified path to MANIFEST.MF to be used for testing bundle.
    But i'm using Import-Library: and Import-Bundle: manifest tags so i'm getting java.lang.NoClassDefFoundError. If i change Import-Bundle to Import-Package: it finds classes. But i don't want to import thousands of packages in all dynamic modules just to get tests working.
    Is there any way to get %subject% with Import-Bundle: declarations?

  • #2
    It seems that the test framework you are using deploys the bundle under test using BundleContext.install or equivalent and therefore Import-Bundle is not expanded.

    dm Server has integration tests which deploy the bundle under test using the dm Server ApplicationDeployer interface and this does expand Import-Bundle. See StandardKernelIntegrationTests in the kernel for an example.

    Comment


    • #3
      Thank you for reply, but i little bit missed the point.
      Here is dependencies I've used for testing:

      Code:
              <dependency>
                  <groupId>org.junit</groupId>
                  <artifactId>com.springsource.junit</artifactId>
                  <version>3.8.2</version>
                  <scope>test</scope>
              </dependency>
              <dependency>
                  <groupId>org.eclipse.osgi</groupId>
                  <artifactId>org.eclipse.osgi</artifactId>
                  <version>3.5.0.v20090311-1300</version>
              </dependency>
              <dependency>
                  <groupId>org.springframework.osgi</groupId>
                  <artifactId>org.springframework.osgi.test</artifactId>
                  <version>1.2.1</version>
                  <scope>test</scope>
              </dependency>
              <dependency>
                  <groupId>org.springframework.osgi</groupId>
                  <artifactId>spring-osgi</artifactId>
                  <type>pom</type>
                  <version>1.2.1</version>
                  <scope>test</scope>
              </dependency>
      I can't find mentioned StandardKernelIntegrationTests. Can you enlighten me?

      Comment


      • #4
        It looks like you are using a Spring DM test framework. Spring DM is a different project to SpringSource dm Server.

        dm Server has its own integration test framework for its own tests, but we haven't documented it. StandardKernelIntegrationTests is part of the kernel, but, on reflection, a more suitable starting point may be BundleDeployerIntegrationTests.

        I'm assuming you want to dive in and get your hands dirty, but if you are looking for a well-documented integration test framework for dm Server, I'm afraid that's not currently available.

        Comment


        • #5
          thank you very much, i think this will be enough

          Comment


          • #6
            hi glyn

            .... got the same problem - I'm using Spring DM test framework to set up integration tests which are deployed on the equinox platform. The Import-Library and Import-Bundle headers are not expanded.

            Before I'm digging into the springsource dm server test framework (i.e. virgo...) are there any plans to address this issue now that the projects moved to the eclipse foundation? Is there a chance that these springsource headers are integrated in the equinox platform?

            Comment


            • #7
              I doubt that Equinox would support these non-standard headers unless/until the headers become part of standard OSGi.

              Comment

              Working...
              X