From 903c9c52999f1421f2f3d8c18a78865e29b73c36 Mon Sep 17 00:00:00 2001 From: DOHA Date: Mon, 17 Oct 2016 19:35:24 +0200 Subject: [PATCH] add integration test profile --- spring-protobuf/pom.xml | 48 ++++++++++- ...t.java => ApplicationIntegrationTest.java} | 2 +- spring-rest-angular/pom.xml | 85 ++++++++++++++----- ...ava => StudentServiceIntegrationTest.java} | 2 +- 4 files changed, 113 insertions(+), 24 deletions(-) rename spring-protobuf/src/test/java/com/baeldung/protobuf/{ApplicationTest.java => ApplicationIntegrationTest.java} (98%) rename spring-rest-angular/src/test/java/org/baeldung/web/service/{StudentServiceTest.java => StudentServiceIntegrationTest.java} (98%) diff --git a/spring-protobuf/pom.xml b/spring-protobuf/pom.xml index 1275d72edf..a080d51221 100644 --- a/spring-protobuf/pom.xml +++ b/spring-protobuf/pom.xml @@ -37,7 +37,6 @@ org.apache.httpcomponents httpclient - 4.5.2 @@ -47,12 +46,57 @@ org.apache.maven.plugins maven-compiler-plugin - 3.3 1.8 1.8 + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IntegrationTest.java + **/*LiveTest.java + + + + + + + integration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*LiveTest.java + + + **/*IntegrationTest.java + + + + + + + json + + + + + + + diff --git a/spring-protobuf/src/test/java/com/baeldung/protobuf/ApplicationTest.java b/spring-protobuf/src/test/java/com/baeldung/protobuf/ApplicationIntegrationTest.java similarity index 98% rename from spring-protobuf/src/test/java/com/baeldung/protobuf/ApplicationTest.java rename to spring-protobuf/src/test/java/com/baeldung/protobuf/ApplicationIntegrationTest.java index a17082cea7..914cf18627 100644 --- a/spring-protobuf/src/test/java/com/baeldung/protobuf/ApplicationTest.java +++ b/spring-protobuf/src/test/java/com/baeldung/protobuf/ApplicationIntegrationTest.java @@ -24,7 +24,7 @@ import static org.junit.Assert.assertThat; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) @WebIntegrationTest -public class ApplicationTest { +public class ApplicationIntegrationTest { private static final String COURSE1_URL = "http://localhost:8080/courses/1"; diff --git a/spring-rest-angular/pom.xml b/spring-rest-angular/pom.xml index 981ee9dabc..ce496df742 100644 --- a/spring-rest-angular/pom.xml +++ b/spring-rest-angular/pom.xml @@ -71,30 +71,75 @@ - - angular-spring-rest-sample - + + angular-spring-rest-sample + - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + - - org.apache.maven.plugins - maven-war-plugin - - false - - + + org.apache.maven.plugins + maven-war-plugin + + false + + - - + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IntegrationTest.java + **/*LiveTest.java + + + + + + + + integration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*LiveTest.java + + + **/*IntegrationTest.java + + + + + + + json + + + + + + + + 19.0 diff --git a/spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceTest.java b/spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceIntegrationTest.java similarity index 98% rename from spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceTest.java rename to spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceIntegrationTest.java index 1199f15ab3..6ad80e5caf 100644 --- a/spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceTest.java +++ b/spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceIntegrationTest.java @@ -18,7 +18,7 @@ import static org.hamcrest.core.IsEqual.*; @SpringApplicationConfiguration(classes = Application.class) @WebAppConfiguration @IntegrationTest("server.port:8888") -public class StudentServiceTest { +public class StudentServiceIntegrationTest { private static final String ENDPOINT = "http://localhost:8888/student/get";