add integration test profile
This commit is contained in:
parent
09825ca25a
commit
e4f1be2daa
|
@ -73,17 +73,63 @@
|
|||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<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>
|
||||
|
|
|
@ -6,5 +6,5 @@ import org.junit.runner.RunWith;
|
|||
|
||||
@RunWith(Cucumber.class)
|
||||
@CucumberOptions(features = "src/test/resources")
|
||||
public class CucumberTest {
|
||||
public class CucumberIntegrationTest {
|
||||
}
|
|
@ -3,7 +3,7 @@ package com.baeldung;
|
|||
import cucumber.api.java.en.Given;
|
||||
import cucumber.api.java.en.When;
|
||||
|
||||
public class OtherDefs extends SpringIntegrationTest {
|
||||
public class OtherDefsIntegrationTest extends SpringIntegrationTest {
|
||||
@When("^the client calls /baeldung$")
|
||||
public void the_client_issues_POST_hello() throws Throwable {
|
||||
executePost("http://localhost:8080/baeldung");
|
|
@ -9,7 +9,7 @@ import cucumber.api.java.en.And;
|
|||
import cucumber.api.java.en.Then;
|
||||
import cucumber.api.java.en.When;
|
||||
|
||||
public class StepDefs extends SpringIntegrationTest {
|
||||
public class StepDefsIntegrationTest extends SpringIntegrationTest {
|
||||
|
||||
@When("^the client calls /version$")
|
||||
public void the_client_issues_GET_version() throws Throwable {
|
Loading…
Reference in New Issue