You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2010/02/22 10:37:02 UTC

svn commit: r912521 - in /incubator/chemistry/trunk/opencmis: opencmis-test/opencmis-test-fit/ opencmis-test/opencmis-test-fit/src/ opencmis-test/opencmis-test-fit/src/main/ opencmis-test/opencmis-test-fit/src/main/java/ opencmis-test/opencmis-test-fit...

Author: fmui
Date: Mon Feb 22 09:37:02 2010
New Revision: 912521

URL: http://svn.apache.org/viewvc?rev=912521&view=rev
Log:
CMIS-122: OpenCMIS integration test framework

Added:
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/java/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/classes/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/classes/repository.properties
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/jetty-web.xml
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/SessionFactory.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractProviderIT.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractSimpleProviderIT.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AtomPubSimpleProviderIT.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/WebServicesSimpleProviderIT.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AtomPubSampleIT.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/WebServicesSampleIT.java
Modified:
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml
    incubator/chemistry/trunk/opencmis/src/site/apt/how-to-build.apt

Modified: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml?rev=912521&r1=912520&r2=912521&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml (original)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml Mon Feb 22 09:37:02 2010
@@ -1,5 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
+<!--
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
@@ -11,10 +25,131 @@
     <groupId>org.opencmis</groupId>
     <artifactId>opencmis</artifactId>
     <version>0.1-SNAPSHOT</version>
-	<relativePath>../../pom.xml</relativePath>
+    <relativePath>../../pom.xml</relativePath>
   </parent>
   
   <artifactId>opencmis-test-fit</artifactId>
   <name>OpenCMIS Full Integration Tests</name>
+  <packaging>war</packaging>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <overlays>
+            <overlay>
+            </overlay>
+            <overlay>
+              <groupId>org.opencmis</groupId>
+              <artifactId>opencmis-server-inmemory</artifactId>
+            </overlay>
+          </overlays>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>failsafe-maven-plugin</artifactId>
+        <version>2.4.3-alpha-1</version>
+        <configuration>
+          <outputName>integration-test</outputName>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>integration-test</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <configuration>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+          <stopPort>9966</stopPort>
+          <stopKey>foo</stopKey>
+          <connectors>
+            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+              <port>9080</port>
+              <host>0.0.0.0</host>
+            </connector>
+          </connectors>
+          <webAppConfig>
+            <contextPath>/opencmis</contextPath>
+          </webAppConfig>
+        </configuration>
+        <executions>
+          <execution>
+            <id>start-jetty</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>run-war</goal>
+            </goals>
+            <configuration>
+              <scanIntervalSeconds>0</scanIntervalSeconds>
+              <daemon>true</daemon>
+            </configuration>
+          </execution>
+          <execution>
+            <id>stop-jetty</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>stop</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <reportSets>
+          <reportSet>
+            <id>integration-tests</id>
+            <reports>
+              <report>report-only</report>
+            </reports>
+            <configuration>
+              <outputName>failsafe-report</outputName>
+              <reportsDirectories>
+                <reportsDirectory>${basedir}/target/failsafe-reports</reportsDirectory>
+              </reportsDirectories>
+            </configuration>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
 
+  <dependencies>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-client-api</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-client-impl</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-server-inmemory</artifactId>
+      <version>${version}</version>
+      <type>war</type>
+    </dependency>
+  </dependencies>
 </project>
\ No newline at end of file

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/classes/repository.properties
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/classes/repository.properties?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/classes/repository.properties (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/classes/repository.properties Mon Feb 22 09:37:02 2010
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class=org.apache.opencmis.inmemory.server.ServiceFactory
+
+# In Memory Settings
+InMemoryServer.RepositoryId=test
+# InMemoryServer.RepositoryInfoCreatorClass=org.apache.opencmis.client.provider.inmemory.UnitTestRepositoryInfo
+InMemoryServer.User=test
+InMemoryServer.Password=test
+InMemoryServer.TypesCreatorClass=org.apache.opencmis.inmemory.types.DefaultTypeSystemCreator
+
+# settings for init repository with data
+  # enable or disable
+RepositoryFiller.Enable=false
+  # Type id of documents that are created
+RepositoryFiller.DocumentTypeId=ComplexType
+  # Type id of folders that are created
+RepositoryFiller.FolderTypeId=cmis:folder
+  # Number of documents created per folder
+RepositoryFiller.DocsPerFolder=3
+  # Number of folders created per folder
+RepositoryFiller.FolderPerFolder=2
+  # number of folder levels created (depth of hierarchy)
+RepositoryFiller.Depth=3
+  # Size of content for documents (0=do not create content), default=0
+RepositoryFiller.ContentSizeInKB=32
+  # properties to set for a document
+RepositoryFiller.DocumentProperty.0=StringProp
+#RepositoryFiller.DocumentProperty.1=StringPropMV
+  # properties to set for a folder
+#RepositoryFiller.FolderProperty.0=StringFolderProp
+  
\ No newline at end of file

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/jetty-web.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/jetty-web.xml?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/jetty-web.xml (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/main/webapp/WEB-INF/jetty-web.xml Mon Feb 22 09:37:02 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting// DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+<!--
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+
+  <Set name="parentLoaderPriority">true</Set>
+
+  <Set name="systemClasses">
+    <Array type="java.lang.String">
+      <Item>java.</Item>
+      <Item>javax.servlet.</Item>
+      <Item>org.mortbay.</Item>
+      <Item>org.xml.</Item>
+      <Item>org.w3c.</Item>
+    </Array>
+  </Set>
+
+</Configure>
\ No newline at end of file

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/SessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/SessionFactory.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/SessionFactory.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/SessionFactory.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.opencmis.client.api.Session;
+import org.apache.opencmis.client.provider.factory.CmisProviderFactory;
+import org.apache.opencmis.commons.SessionParameter;
+import org.apache.opencmis.commons.provider.CmisProvider;
+
+/**
+ * Session factory for integration tests.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class SessionFactory {
+
+  private static final String HOST = "localhost";
+  private static final int PORT = 9080;
+
+  private static final String REPOSITORY_ID = "test";
+  private static final String USER = "test";
+  private static final String PASSWORD = "test";
+
+  private static final String ATOMPUB_PATH = "/opencmis/atom";
+  private static final String WEBSERVICES_PATH = "/opencmis/services/";
+
+  /**
+   * Returns the repository id of the test repository.
+   */
+  public static String getRepositoryId() {
+    return REPOSITORY_ID;
+  }
+
+  /**
+   * Returns the user that is logged in.
+   */
+  public static String getUsername() {
+    return USER;
+  }
+
+  /**
+   * Creates a new Session object that uses the AtomPub binding.
+   */
+  public static Session createAtomPubSession() {
+    String url = "http://" + HOST + ":" + PORT + ATOMPUB_PATH;
+
+    Map<String, String> parameters = new HashMap<String, String>();
+
+    parameters.put(SessionParameter.USER, USER);
+    parameters.put(SessionParameter.PASSWORD, PASSWORD);
+    parameters.put(SessionParameter.ATOMPUB_URL, url);
+
+    // ToDo: creates session
+    return null;
+  }
+
+  /**
+   * Creates a new Session object that uses the Web Services binding.
+   */
+  public static Session createWebServicesSession() {
+    String url = "http://" + HOST + ":" + PORT + WEBSERVICES_PATH;
+
+    Map<String, String> parameters = new HashMap<String, String>();
+
+    parameters.put(SessionParameter.USER, USER);
+    parameters.put(SessionParameter.PASSWORD, PASSWORD);
+    parameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, url + "RepositoryService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, url + "NavigationService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, url + "ObjectService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, url + "VersioningService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, url + "DiscoveryService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, url
+        + "RelationshipService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, url
+        + "MultiFilingService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, url + "PolicyService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE, url + "ACLService?wsdl");
+
+    // ToDo: create session
+    return null;
+  }
+
+  /**
+   * Creates a new CmisProvider object that uses the AtomPub binding. For low-level tests only!
+   */
+  public static CmisProvider createAtomPubProvider() {
+    String url = "http://" + HOST + ":" + PORT + ATOMPUB_PATH;
+
+    Map<String, String> parameters = new HashMap<String, String>();
+
+    parameters.put(SessionParameter.USER, USER);
+    parameters.put(SessionParameter.PASSWORD, PASSWORD);
+    parameters.put(SessionParameter.ATOMPUB_URL, url);
+
+    return CmisProviderFactory.newInstance().createCmisAtomPubProvider(parameters);
+  }
+
+  /**
+   * Creates a new CmisProvider object that uses the Web Services binding. For low-level tests only!
+   */
+  public static CmisProvider createWebServicesProvider() {
+    String url = "http://" + HOST + ":" + PORT + WEBSERVICES_PATH;
+
+    Map<String, String> parameters = new HashMap<String, String>();
+
+    parameters.put(SessionParameter.USER, USER);
+    parameters.put(SessionParameter.PASSWORD, PASSWORD);
+    parameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, url + "RepositoryService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, url + "NavigationService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, url + "ObjectService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, url + "VersioningService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, url + "DiscoveryService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, url
+        + "RelationshipService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, url
+        + "MultiFilingService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, url + "PolicyService?wsdl");
+    parameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE, url + "ACLService?wsdl");
+
+    return CmisProviderFactory.newInstance().createCmisWebServicesProvider(parameters);
+  }
+}
\ No newline at end of file

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractProviderIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractProviderIT.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractProviderIT.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractProviderIT.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit.provider;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.opencmis.commons.PropertyIds;
+import org.apache.opencmis.commons.enums.UnfileObjects;
+import org.apache.opencmis.commons.provider.CmisProvider;
+import org.apache.opencmis.commons.provider.PropertiesData;
+import org.apache.opencmis.commons.provider.PropertyData;
+import org.apache.opencmis.commons.provider.RepositoryInfoData;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+
+/**
+ * Base class for Provider layer tests. It makes sure that the provider object is only created once
+ * and that there is a test folder.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AbstractProviderIT {
+  public static String FOLDER_TYPE = "cmis:folder";
+  public static String DOCUMENT_TYPE = "cmis:document";
+
+  private static CmisProvider fProvider;
+  private static String fRepositoryId;
+  private static String fTestFolderId;
+
+  /**
+   * Returns the id of test folder. Tests should only use this folder.
+   */
+  protected String getTestFolderId() {
+    return fTestFolderId;
+  }
+
+  /**
+   * Returns the current Provider object.
+   */
+  protected static CmisProvider getProvider() {
+    return fProvider;
+  }
+
+  /**
+   * Returns a new Provider object.
+   */
+  protected abstract CmisProvider createProvider();
+
+  /**
+   * Returns the repository id of the test repository.
+   */
+  protected abstract String getRepositoryId();
+
+  @BeforeClass
+  public static void setUpClass() {
+    fProvider = null;
+  }
+
+  @Before
+  public void setUpTest() {
+    // only the first test creates the test environment
+    if (fProvider == null) {
+      System.out.println("Creating provider...");
+
+      fProvider = createProvider();
+      fRepositoryId = getRepositoryId();
+      createTestFolder();
+    }
+  }
+
+  @AfterClass
+  public static void tearDownClass() {
+    deleteTestFolder();
+    fProvider = null;
+  }
+
+  /**
+   * Creates a folder that will be used by all read-write tests.
+   */
+  private void createTestFolder() {
+    System.out.println("Creating test folder...");
+
+    // get root folder id
+    RepositoryInfoData ri = getProvider().getRepositoryService().getRepositoryInfo(fRepositoryId,
+        null);
+    assertNotNull(ri);
+    assertNotNull(ri.getRootFolderId());
+
+    String rootFolderId = ri.getRootFolderId();
+
+    // set up properties
+    List<PropertyData<?>> propertyList = new ArrayList<PropertyData<?>>();
+    propertyList.add(getProvider().getObjectFactory().createPropertyStringData(
+        PropertyIds.CMIS_NAME, "provider-tests-" + System.currentTimeMillis()));
+    propertyList.add(getProvider().getObjectFactory().createPropertyIdData(
+        PropertyIds.CMIS_OBJECT_TYPE_ID, FOLDER_TYPE));
+
+    PropertiesData properties = getProvider().getObjectFactory().createPropertiesData(propertyList);
+
+    // create the folder
+    fTestFolderId = getProvider().getObjectService().createFolder(fRepositoryId, properties,
+        rootFolderId, null, null, null, null);
+  }
+
+  /**
+   * Deletes the test folder.
+   */
+  private static void deleteTestFolder() {
+    if (fTestFolderId == null) {
+      return;
+    }
+
+    System.out.println("Deleting test folder...");
+
+    // delete the whole tree
+    getProvider().getObjectService().deleteTree(fRepositoryId, fTestFolderId, true,
+        UnfileObjects.DELETE, true, null);
+  }
+}

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractSimpleProviderIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractSimpleProviderIT.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractSimpleProviderIT.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AbstractSimpleProviderIT.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit.provider;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.ByteArrayInputStream;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.opencmis.commons.PropertyIds;
+import org.apache.opencmis.commons.enums.IncludeRelationships;
+import org.apache.opencmis.commons.enums.VersioningState;
+import org.apache.opencmis.commons.provider.ContentStreamData;
+import org.apache.opencmis.commons.provider.ObjectData;
+import org.apache.opencmis.commons.provider.PropertiesData;
+import org.apache.opencmis.commons.provider.PropertyData;
+import org.apache.opencmis.commons.provider.RepositoryInfoData;
+import org.junit.Test;
+
+/**
+ * Really simple Provider layer test. It just contains a few smoke tests to make sure that the
+ * provider layer is working properly in the integration test environment.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AbstractSimpleProviderIT extends AbstractProviderIT {
+
+  @Test
+  public void testRepositoryInfo() {
+    RepositoryInfoData ri = getProvider().getRepositoryService().getRepositoryInfo(
+        getRepositoryId(), null);
+    assertNotNull(ri);
+
+    assertEquals(getRepositoryId(), ri.getRepositoryId());
+    assertNotNull(ri.getProductName());
+    assertNotNull(ri.getRootFolderId());
+    assertNotNull(ri.getRepositoryCapabilities());
+  }
+
+  @Test
+  public void testCreateDocument() {
+    // set up properties
+    List<PropertyData<?>> propertyList = new ArrayList<PropertyData<?>>();
+    propertyList.add(getProvider().getObjectFactory().createPropertyStringData(
+        PropertyIds.CMIS_NAME, "testdoc.txt"));
+    propertyList.add(getProvider().getObjectFactory().createPropertyIdData(
+        PropertyIds.CMIS_OBJECT_TYPE_ID, DOCUMENT_TYPE));
+
+    PropertiesData properties = getProvider().getObjectFactory().createPropertiesData(propertyList);
+
+    // set up content
+    byte[] content = "This is a test file!".getBytes();
+
+    ContentStreamData contentStream = getProvider().getObjectFactory()
+        .createContentStream(BigInteger.valueOf(content.length), "text/plain", "test",
+            new ByteArrayInputStream(content));
+
+    // create document
+    String docId = getProvider().getObjectService().createDocument(getRepositoryId(), properties,
+        getTestFolderId(), contentStream, VersioningState.NONE, null, null, null, null);
+    assertNotNull(docId);
+
+    // get the document
+    ObjectData object = getProvider().getObjectService().getObject(getRepositoryId(), docId, null,
+        false, IncludeRelationships.NONE, null, false, false, null);
+    assertNotNull(object);
+    assertEquals(docId, object.getId());
+
+    // delete the document
+    getProvider().getObjectService().deleteObject(getRepositoryId(), docId, true, null);
+  }
+}

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AtomPubSimpleProviderIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AtomPubSimpleProviderIT.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AtomPubSimpleProviderIT.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/AtomPubSimpleProviderIT.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit.provider;
+
+import org.apache.opencmis.commons.provider.CmisProvider;
+import org.apache.opencmis.fit.SessionFactory;
+
+/**
+ * AtomPub Provider layer test.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AtomPubSimpleProviderIT extends AbstractSimpleProviderIT {
+
+  @Override
+  protected CmisProvider createProvider() {
+    return SessionFactory.createAtomPubProvider();
+  }
+
+  @Override
+  protected String getRepositoryId() {
+    return SessionFactory.getRepositoryId();
+  }
+
+}

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/WebServicesSimpleProviderIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/WebServicesSimpleProviderIT.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/WebServicesSimpleProviderIT.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/provider/WebServicesSimpleProviderIT.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit.provider;
+
+import org.apache.opencmis.commons.provider.CmisProvider;
+import org.apache.opencmis.fit.SessionFactory;
+
+/**
+ * Web Services Provider layer test.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class WebServicesSimpleProviderIT extends AbstractSimpleProviderIT {
+
+  @Override
+  protected CmisProvider createProvider() {
+    return SessionFactory.createWebServicesProvider();
+  }
+
+  @Override
+  protected String getRepositoryId() {
+    return SessionFactory.getRepositoryId();
+  }
+
+}

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit.sample;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.apache.opencmis.client.api.Session;
+import org.apache.opencmis.client.api.repository.RepositoryInfo;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Sample test case that demonstrates how to build integration tests.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AbstractSampleIT {
+
+  private static Session fSession;
+
+  /**
+   * Returns the current Session object.
+   */
+  protected Session getSession() {
+    return fSession;
+  }
+
+  /**
+   * Returns a new Session object.
+   */
+  protected abstract Session createSession();
+
+  @BeforeClass
+  public static void setUpClass() {
+    fSession = null;
+  }
+
+  @Before
+  public void setUp() {
+    if (fSession == null) {
+      fSession = createSession();
+    }
+  }
+
+  /**
+   * Simple sample test.
+   */
+  @Test
+  public void testRepositoryInfo() {
+    // RepositoryInfo ri = getSession().getRepositoryInfo();
+    // assertNotNull(ri);
+  }
+}

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AtomPubSampleIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AtomPubSampleIT.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AtomPubSampleIT.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AtomPubSampleIT.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit.sample;
+
+import org.apache.opencmis.client.api.Session;
+import org.apache.opencmis.fit.SessionFactory;
+
+/**
+ * AtomPub sample test.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AtomPubSampleIT extends AbstractSampleIT {
+
+  @Override
+  protected Session createSession() {
+    return SessionFactory.createAtomPubSession();
+  }
+  
+}

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/WebServicesSampleIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/WebServicesSampleIT.java?rev=912521&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/WebServicesSampleIT.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/WebServicesSampleIT.java Mon Feb 22 09:37:02 2010
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.fit.sample;
+
+import org.apache.opencmis.client.api.Session;
+import org.apache.opencmis.fit.SessionFactory;
+
+/**
+ * Web Services sample test.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class WebServicesSampleIT extends AbstractSampleIT {
+
+  @Override
+  protected Session createSession() {
+    return SessionFactory.createWebServicesSession();
+  }
+
+}

Modified: incubator/chemistry/trunk/opencmis/src/site/apt/how-to-build.apt
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/src/site/apt/how-to-build.apt?rev=912521&r1=912520&r2=912521&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/src/site/apt/how-to-build.apt (original)
+++ incubator/chemistry/trunk/opencmis/src/site/apt/how-to-build.apt Mon Feb 22 09:37:02 2010
@@ -17,9 +17,9 @@
   
   []
   
-+---------------+
-mvn clean install
-+---------------+
++--------------------------------------+
+mvn clean install -Dmaven.test.skip=true
++--------------------------------------+
 
 
 * Build the Client Libraries