cancel
Showing results for 
Search instead for 
Did you mean: 

Unit testing services based on CMIS API

ldworski_
Champ on-the-rise
Champ on-the-rise

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.

1 ACCEPTED ANSWER

Julien_Carsique
Elite Collaborator
Elite Collaborator

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" })
    

View answer in original post

2 REPLIES 2

Julien_Carsique
Elite Collaborator
Elite Collaborator

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" })
    

Thank you, it was very useful

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.