failsafe:integration-test runs the tests and stores whether the tests passed or failed in a file
failsafe:verify reads back that file and then if there were failing tests it fails the build. On 25 May 2015 at 15:06, hongbin ma <[email protected]> wrote: > hi, I'm new to failsafe, > > i'm starting to move a test case from unit test to integration test, and > i'm using > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-failsafe-plugin</artifactId> > <executions> > <execution> > <id>integration-tests</id> > <phase>integration-test</phase> > <goals> > <goal>integration-test</goal> > <goal>verify</goal> > </goals> > </execution> > </executions> > > in my pom. > > When I run "mvn verify", I found my new integration test ran twice. > I realized that both the "integration-test" and "verify" goal may > contribute to it. > Should I remove the line "<goal>verify</goal>" in pom? > But It seems most failsafe tutorials keeps both goals in their poms. > > The question is, what are these two goals for? > The official explanation: > > *integration-test for running the integration tests.* > *verify for checking the results of the integration tests.* > > seems so vague to me. > Can any expert give me a concrete example? > > thanks! > > -- > Regards, > > *Bin Mahone | 马洪宾* > Apache Kylin: http://kylin.io > Github: https://github.com/binmahone >
