What is the difference between the Maven Surefire and Maven Failsafe plugins?

前端 未结 3 1964
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 02:55

What is the difference between Maven Surefire and Maven Failsafe plugins?
I have searched all over web, but did not get the answer.

3条回答
  •  时光说笑
    2020-12-23 03:24

    From https://maven.apache.org/surefire/maven-failsafe-plugin/, I would say that the difference between Surefire and Failsafe is the way they fail:

    If you use the Surefire Plugin for running tests, then when you have a test failure, the build will stop at the integration-test phase and your integration test environment will not have been torn down correctly.

    The Failsafe Plugin is used during the integration-test and verify phases of the build lifecycle to execute the integration tests of an application. The Failsafe Plugin will not fail the build during the integration-test phase, thus enabling the post-integration-test phase to execute.

提交回复
热议问题