0

According to the maven failsafe plugin documentation http://maven.apache.org/surefire/maven-failsafe-plugin/ mvn verify should execute all the integration test class files but it looks like it is not doing so. The unit tests does get executed but not the integration tests even after following proper file naming conventions.

mvn verify

HelloWorldControllerTest.java (Executes)
HelloWorldControllerIT.java (Does NOT Execute)

pom.xml

 <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
    </build>

Do I need to do any explicit configuration? Is it mandatory to to bind fail safe's integration-test goal to maven's verify phase.

Nital
  • 5,784
  • 26
  • 103
  • 195
  • Yes you need to add maven-failsafe-plugin to the integration-test phase... – khmarbaise Jun 05 '17 at 21:36
  • Appreciate your quick response. But I am still confused why do we need to do that explicity? Shouldn't maven execute all the integration tests since the `integration-test` goal precedes `verify` goal? – Nital Jun 05 '17 at 21:40
  • The life cycle is run completely but you can run integration tests via maven-failsafe-plugin but of course you can do other things like bdd tests running or many other opportunities are out there...that's the reason you have to add that manually... – khmarbaise Jun 05 '17 at 22:06

0 Answers0