Configure Integration Tests.

This commit is contained in:
Paulo Gustavo Veiga 2012-03-10 17:35:35 -03:00
parent 4f1edd0af4
commit 2d38b5d990
5 changed files with 49 additions and 21 deletions

View File

@ -420,21 +420,40 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<parallel>true</parallel>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.0.v20120127</version>
<configuration>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
<war>${project.build.directory}/wisemapping.war</war>
<reload>automatic</reload>
<scanIntervalSeconds>10</scanIntervalSeconds>
</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>
<plugin>
@ -483,6 +502,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -1,6 +1,6 @@
log4j.rootLogger=WARN, stdout, R
log4j.logger.com.wisemapping=WARN,stdout,R
log4j.logger.org.springframework=DEBUG,stdout,R
log4j.logger.org.springframework=WARN,stdout,R
log4j.logger.org.codehaus.jackson=WARN,stdout,R
# Stdout logger <20>

View File

@ -10,7 +10,6 @@ import com.wisemapping.model.MindMap;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.xml.sax.SAXException;

View File

@ -0,0 +1,17 @@
package com.wisemapping.test.rest;
import org.testng.annotations.Test;
@Test
public class RestAdminITCase {
@Test
public void createNewUser() {
String uri = "http://localhost:9000/service/admin/user";
// RestTemplate template = new RestTemplate();
// location = template.postForLocation(uri);
}
}

View File

@ -1,15 +0,0 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="WiseMapping Java Tests" verbose="1">
<test name="FreeMind Export Tests">
<packages>
<package name="com.wisemapping.test.freemind"/>
<package name="com.wisemapping.test.export"/>
</packages>
</test>
<test name="Model Tests">
<packages>
<package name="com.wisemapping.test.model"/>
</packages>
</test>
</suite>