Unit testing services based on CMIS API

Hi,

How to test classess that using Nuxeo CMIS API? I've created services which are executing CMIS operations provided by Nuxeo. Now I'am trying to test my services with JUnit. Is it possible to run Nuxeo and expose CMIS operation for the time of test execution?

After reading http://doc.nuxeo.com/display/CORG/Unit+Testing I think I have to define some specific feature or deploy some specific bundle. I am able to run Nuxeo during the test, but don't know how to expose CMIS operations.

I appreciate any help.

0 votes

1 answers

1019 views

ANSWER



Hi,

You can give a look at Nuxeo CMIS tests. Briefly, you will have to:

  • add nuxeo-opencmis artifacts in your POM

    <dependency>
      <groupId>org.nuxeo.ecm.core</groupId>
      <artifactId>nuxeo-opencmis-bindings</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.ecm.core</groupId>
      <artifactId>nuxeo-opencmis-impl</artifactId>
    </dependency>
    
  • Add bundles deploy instruction in your test class

    @Deploy({ "org.nuxeo.ecm.core.opencmis.impl",
            "org.nuxeo.ecm.core.opencmis.bindings" })
    
1 votes



Thank you, it was very useful
06/27/2012