add integration test profile

This commit is contained in:
DOHA 2016-10-19 13:40:56 +02:00
parent 890128654b
commit 496553caaf
3 changed files with 53 additions and 2 deletions

View File

@ -20,6 +20,7 @@
<org.slf4j.version>1.7.12</org.slf4j.version>
<logback.version>1.1.3</logback.version>
<elasticsearch.version>2.0.1.RELEASE</elasticsearch.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
</properties>
<dependencies>
@ -86,4 +87,54 @@
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*LiveTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>integration</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>**/*LiveTest.java</exclude>
</excludes>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
</configuration>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<test.mime>json</test.mime>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -29,7 +29,7 @@ import com.baeldung.spring.data.es.service.ArticleService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = Config.class)
public class ElasticSearchTest {
public class ElasticSearchIntegrationTest {
@Autowired
private ElasticsearchTemplate elasticsearchTemplate;

View File

@ -42,7 +42,7 @@ import com.baeldung.spring.data.es.service.ArticleService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = Config.class)
public class ElasticSearchQueryTest {
public class ElasticSearchQueryIntegrationTest {
@Autowired
private ElasticsearchTemplate elasticsearchTemplate;