You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by bd...@apache.org on 2010/12/10 16:54:28 UTC
svn commit: r1044410 - in /incubator/stanbol/trunk/fise/integration-tests:
./ src/test/java/eu/iksproject/fise/jersey/ src/test/java/org/
src/test/java/org/apache/ src/test/java/org/apache/stanbol/
src/test/java/org/apache/stanbol/enhancer/ src/test/ja...
Author: bdelacretaz
Date: Fri Dec 10 15:54:27 2010
New Revision: 1044410
URL: http://svn.apache.org/viewvc?rev=1044410&view=rev
Log:
STANBOL-19 - first shot at integration tests skeleton
Added:
incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/
incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/
incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/
incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/
incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/
incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DummyTest.java (with props)
Removed:
incubator/stanbol/trunk/fise/integration-tests/src/test/java/eu/iksproject/fise/jersey/
Modified:
incubator/stanbol/trunk/fise/integration-tests/ (props changed)
incubator/stanbol/trunk/fise/integration-tests/pom.xml
Propchange: incubator/stanbol/trunk/fise/integration-tests/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Dec 10 15:54:27 2010
@@ -8,3 +8,4 @@ bin
.classpath
.externalToolBuilders
maven-eclipse.xml
+sling
Modified: incubator/stanbol/trunk/fise/integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/fise/integration-tests/pom.xml?rev=1044410&r1=1044409&r2=1044410&view=diff
==============================================================================
--- incubator/stanbol/trunk/fise/integration-tests/pom.xml (original)
+++ incubator/stanbol/trunk/fise/integration-tests/pom.xml Fri Dec 10 15:54:27 2010
@@ -1,90 +1,110 @@
<?xml version="1.0"?>
<project>
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>eu.iksproject</groupId>
+ <artifactId>eu.iksproject.fise.parent</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
- <parent>
<groupId>eu.iksproject</groupId>
- <artifactId>eu.iksproject.fise.parent</artifactId>
+ <artifactId>eu.iksproject.fise.integration-tests</artifactId>
<version>0.9-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>eu.iksproject</groupId>
- <artifactId>eu.iksproject.fise.integration-tests</artifactId>
- <version>0.9-SNAPSHOT</version>
- <packaging>jar</packaging>
-
- <name>IKS FISE Integration Tests</name>
-
- <properties>
- <pax-exam-version>1.2.0</pax-exam-version>
- </properties>
-
- <dependencies>
- <!-- things to test -->
- <dependency>
- <groupId>eu.iksproject</groupId>
- <artifactId>eu.iksproject.fise.jersey</artifactId>
- <version>0.9-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>4.2.0</version>
- <scope>test</scope>
- </dependency>
-
- <!-- for tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.7</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam</artifactId>
- <version>${pax-exam-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit</artifactId>
- <version>${pax-exam-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-default</artifactId>
- <version>${pax-exam-version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>maven-paxexam-plugin</artifactId>
- <version>1.2.2</version>
- <executions>
- <execution>
- <id>generate-config</id>
- <goals>
- <goal>generate-config</goal>
- </goals>
- </execution>
- </executions>
+ <packaging>jar</packaging>
- <configuration>
- <options>
- <profiles>log</profiles>
- </options>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <name>IKS FISE Integration Tests</name>
-</project>
+ <properties>
+ <test.hostname>localhost</test.hostname>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>eu.iksproject</groupId>
+ <artifactId>eu.iksproject.fise.launchers.full</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-exec</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>${basedir}</directory>
+ <includes>
+ <!-- sling folder is the workdir of the executable jar that we test -->
+ <include>sling</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-runnable-jar</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <includeArtifactIds>eu.iksproject.fise.launchers.full</includeArtifactIds>
+ <excludeTransitive>true</excludeTransitive>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- Find free ports to run our server -->
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>reserve-server-port</id>
+ <goals>
+ <goal>reserve-network-port</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <portNames>
+ <portName>server.port</portName>
+ </portNames>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <jar.executor.server.port>${server.port}</jar.executor.server.port>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DummyTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DummyTest.java?rev=1044410&view=auto
==============================================================================
--- incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DummyTest.java (added)
+++ incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DummyTest.java Fri Dec 10 15:54:27 2010
@@ -0,0 +1,44 @@
+/*
+ * 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.stanbol.enhancer.it;
+
+import org.apache.stanbol.commons.testing.it.JarExecutor;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/** Demonstrates how to start the runnable jar, with this and a mechanism
+ * to check when the server is ready we should be ready to start writing
+ * integration tests that talk to the server via http.
+ */
+public class DummyTest {
+
+ @BeforeClass
+ public static void startRunnableJar() throws Exception {
+ JarExecutor.getInstance(System.getProperties()).start();
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+ // TODO check that server is started and test it...
+ final long delay = 10000;
+ System.out.println(getClass().getName()
+ + " - this test does nothing for now, just waits "
+ + delay + " msec to let you check that the server is starting ...");
+ Thread.sleep(delay);
+ System.out.println(getClass().getName() + " - done waiting");
+ }
+}
Propchange: incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DummyTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/stanbol/trunk/fise/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DummyTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL