From 2d38b5d9909d0a9d7144171ae67e031da4861f20 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 10 Mar 2012 17:35:35 -0300 Subject: [PATCH] Configure Integration Tests. --- wise-webapp/pom.xml | 35 ++++++++++++++++--- .../webapp/WEB-INF/classes/log4j.properties | 2 +- .../wisemapping/test/export/ExportTest.java | 1 - .../test/rest/RestAdminITCase.java | 17 +++++++++ wise-webapp/testng.xml | 15 -------- 5 files changed, 49 insertions(+), 21 deletions(-) create mode 100644 wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java delete mode 100644 wise-webapp/testng.xml diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 0387d1f4..e7d13dec 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -420,21 +420,40 @@ maven-surefire-plugin true - - testng.xml - - + org.mortbay.jetty jetty-maven-plugin 8.1.0.v20120127 + foo + 9999 ${project.build.directory}/wisemapping.war automatic 10 + + + start-jetty + pre-integration-test + + run-war + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + @@ -483,6 +502,14 @@ org.apache.maven.plugins maven-failsafe-plugin + + + + integration-test + verify + + + diff --git a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties index 69310dd9..8abef6ba 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties @@ -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 � diff --git a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java index cefaa7ea..71552417 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java @@ -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; diff --git a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java new file mode 100644 index 00000000..3fb43465 --- /dev/null +++ b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java @@ -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); + } +} diff --git a/wise-webapp/testng.xml b/wise-webapp/testng.xml deleted file mode 100644 index 8ad94978..00000000 --- a/wise-webapp/testng.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - -