Installation

  1. Install Canoo Webtest 2.6 (http://canoo.webtest.com)
  2. Set WEBTEST_HOME to point at Canoo Wentest home
  3. Add $WEBTEST_HOME/bin to the path
  4. Have a WFS/WMS map-server running. The ssettings for the map-server are customized, use src/main/resources/META-INF/cocoon/properties/nitsch-dev/geoid-samples.properties as template and set the Cocoon mode accordingly (org.apache.cocoon.mode is the Maven command-line parameter to set).
  5. Create a Cocoon webApp:
    mvn archetype:create -DarchetypeGroupId=org.apache.cocoon -DarchetypeArtifactId=cocoon-22-archetype-webapp -DarchetypeVersion=1.0.0-RC1 -DgroupId=com.mycompany -DartifactId=myGeoidWebapp -Dorg.apache.cocoon.mode=nitsch-dev Due to a bug in Maven, yu may have to specify the archtype version: mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create -DarchetypeGroupId=org.apache.cocoon -DarchetypeArtifactId=cocoon-22-archetype-webapp -DarchetypeVersion=1.0.0-RC1 -DgroupId=com.mycompany -DartifactId=myGeoidWebapp -Dorg.apache.cocoon.mode=nitsch-dev

    NOTE: nitsch-dev is a "running mode" on a development machine: build your own by using /geoid-samples/src/main/resources/META-INF/cocoon/properties/nitsch-dev/geoid-samples.properties as a blueprint

  6. Change dir to myGeoidWebapp and edit the pom.xml file, adding:
    • The following "repositories" element (within the "project" element and after the "version" one)
      <repositories> <repository> <id>cocoondev</id> <name>Cocoondev Maven repository</name> <url>http://www.lucamorandini.it/maven</url> </repository> </repositories>
    • The following "dependencies" element
      <dependencies> <dependency> <groupId>org.cocoondev</groupId> <artifactId>geoid-samples</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies>
    • The following "plugin" element
      <plugin> <artifactId>maven-antrun-plugin</artifactId> <groupId>org.apache.maven.plugins</groupId> <version>1.1</version> <dependencies> <dependency> <groupId>ant</groupId> <artifactId>ant-trax</artifactId> <version>1.6.5</version> </dependency> </dependencies> <executions> <execution> <!-- Since a bug in antrun prevents tests to be skipped (see MANTRUN-75 http://jira.codehaus.org/browse/MANTRUN-75? page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ), this test task is bind to the post-site phase, to avoid having tests run at evey "mvn install" --> <phase>post-site</phase> <configuration> <tasks unless="maven.test.skip"> <property environment="env"/> <property name="webtest.home" value="${env.WEBTEST_HOME}"/> <property name="test.home" value="./target/work/blocks/geoid-samples/test"/> <condition property="sys" value="${sys}" else="localhost"> <available file="${test.home}/includes/${sys}.properties"/> </condition> <property file="${test.home}/includes/${sys}.properties"/> <property file="${test.home}/includes/test.properties"/> <echo message="Starting test on ${sys} system"/> <ant antfile="build.xml" inheritAll="true" dir="${test.home}" target="wt.full"> </ant> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin>
  7. Move into the myGeoidWebApp directory
  8. Type: mvn install
  9. Type: mvn jetty:run -Dmaven.test.skip=true
  10. Open another shell
  11. Run integrations test by executing: mvn post-site (some of the cache performance test may fail, since execution time may differ from machin to machine: change src/main/test/includes/localhost.properties to take this into account)