configure test profiles

This commit is contained in:
DOHA 2016-10-29 13:59:48 +02:00
parent f164e58c7c
commit d0882abc5f
3 changed files with 44 additions and 2 deletions

View File

@ -141,12 +141,52 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<excludes>
<exclude>**/*LiveTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>live</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludes>
<exclude>**/*ManualTest.java</exclude>
</excludes>
<includes>
<include>**/*LiveTest.java</include>
</includes>
</configuration>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<test.mime>json</test.mime>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<!-- persistence -->
<hibernate.version>4.3.11.Final</hibernate.version>

View File

@ -30,7 +30,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class HttpClientMultipartTest {
public class HttpClientMultipartLiveTest {
private static final String SERVER = "http://echo.200please.com";
private static final String TEXTFILENAME = "temp.txt";

View File

@ -27,9 +27,11 @@ import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.junit.Ignore;
import org.junit.Test;
public class HttpClientPostingTest {
@Ignore("need spring-rest module running")
public class HttpClientPostingLiveTest {
private static final String SAMPLE_URL = "http://localhost:8080/spring-rest/users";
private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://browserspy.dk/password-ok.php";
private static final String DEFAULT_USER = "test";