Hi,

I am using failsafe plugin to run integration test. In my case, I have 3 ph^ase : start container, run test and stop container.
If the phase "run test" failed, the stop phase is never called.
Is this behaviour due to a configuration problem or a bug ?

Here is my configuration :
<?xml version="1.0" encoding="UTF-8"?>
<project>
     [....]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.7.1</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks description="container : STARTING">
<echo message="================================" />
<echo message="= STARTING container... =" />
<echo message="================================" />
                                        [...]
</tasks>
</configuration>
</execution>

<execution>
<id>integration-component-test</id>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks description="container : RUNNING Integration Test">
<echo message="================================" />
<echo message="= RUNNING integration test.... =" />
<echo message="================================" />

*<fail message="mail component tests failed!">
</fail>*
</tasks>
</configuration>
</execution>

<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks description="container: STOPPING">
<echo message="================================" />
<echo message="= STOPPING container... =" />
<echo message="================================" />
                                        [...]
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>

Thanks.

--
Mathieu

Reply via email to