Results 1 to 9 of 9

Thread: Integration testing within a dm server instance?

  1. #1

    Default Integration testing within a dm server instance?

    Hi,

    in the Getting started guide, the GreenPages application is only integration tested outside an OSGi container. I am wondering if spring dm server provides any tools/APIs to integration test the application bundles within an actual dm server instance?

    regards, Peter

  2. #2
    Join Date
    Apr 2009
    Posts
    4

    Default

    You can try this sample---https://anonsvn.springsource.org/svn/dm-server-samples/hello-integration-test/trunk/hello-integration-testing。
    It's an integration test with dm server.

  3. #3
    Join Date
    Oct 2008
    Location
    Southampton, England
    Posts
    61

    Default

    The sample app suggested there is potentially working on an old version of our testing framework. It has since been overhauled and we don't have any samples for the new one. Apologies for the confusion. I have created a JIRA for this. I'm going to remove that sample application.

  4. #4

    Default

    So, there exists an "in-server integration test framework" but it is missing sample code. So, while waiting for https://issuetracker.springsource.com/browse/DMS-992 to be resolved, how would I go about to learn how to use it? Are there any documentation, javadoc, test cases, etc that could lead me in the right direction?

    best regards, Peter

  5. #5
    Join Date
    Oct 2008
    Location
    Southampton, England
    Posts
    61

    Default

    Hi,

    We have a couple of test frameworks and they are all deprecated except the one used in out web and slices projects. It is not currentley supported publically as we are still tweeking how it works as we roll it out to the rest of out projects. As such, there is no supporting material. I would just keep an eye on the Team Blog, we will make plenty of noise once it is ready for general use. In the mean time you are welcome to use what is there and just copy how testing is done in the web and slices projects.

    Thanks, Chris.

  6. #6
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    97

    Default

    Am I correct in thinking that there is no way to get feedback as to whether an app has correctly deployed to a DM Server instance? Because it's going to be impossible to fail fast if the only option we have for [re]deployment is 'copy the jar and hope it works'.

  7. #7
    Join Date
    Oct 2008
    Posts
    493

    Default

    There are JMX MBeans that allow you to determine the success or otherwise of a deployment.

    One option is to use the Deployer MBean to actually perform the deployment. The call to the MBean will throw an exception if deployment fails. Another option is to continue performing the deployment as you are today, but to then query the MBeans to determine whether or not to deployment was successful by its presence or otherwise in the list of deployed artifacts.

    The first of these two options is possible today, with the caveat that you'll have to have the deployer's JAR on the client's classpath so that DeploymentException is available. This will be improved soon under DMS-189. The second of these two options is largely there today, and will be completely in place once we've completed the move to the new deployer implementation.

    Please take a look at these two options and see if they fit your needs today. If they don't, let us know, and we'll see what we can do to help.
    Andy Wilkinson
    SpringSource

  8. #8
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    97

    Default

    I'll have to see what's involved in making maven use the deployer mbean, but the ultimate best case solution would be a maven plugin and/or an ant task, similar to cargo or maven-tomcat-plugin (http://mojo.codehaus.org/tomcat-mave...eployment.html) that you can just drop in to a maven build.

  9. #9
    Join Date
    Oct 2008
    Posts
    493

    Default

    Ok, I think what you're really looking for is DMS-293 which I see from the list of watchers that you've already found.
    Andy Wilkinson
    SpringSource

Posting Permissions

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