Results 1 to 7 of 7

Thread: OSGi Integration testing with DM Server

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Minsk, BY
    Posts
    9

    Default 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?
    How would be wonderful if we had sources for life

  2. #2
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    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.
    Glyn Normington
    SpringSource

  3. #3
    Join Date
    Jun 2009
    Location
    Minsk, BY
    Posts
    9

    Default

    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?
    How would be wonderful if we had sources for life

  4. #4
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    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.
    Glyn Normington
    SpringSource

  5. #5
    Join Date
    Jun 2009
    Location
    Minsk, BY
    Posts
    9

    Default

    thank you very much, i think this will be enough
    How would be wonderful if we had sources for life

  6. #6

    Default 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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •