我读过Maven Failsafe插件是专门为运行集成测试而设计的.目前我正在开发一个多模块项目,集成测试在自己独立的模块中,用TestNg编写并使用Surefire插件运行.我们没有与单元测试冲突,因为只有集成测试在该模块的测试阶段运行.要在测试之前设置环境,并在运行测试后进行清理,@BeforeSuite @AfterSuite请使用TestNg注释.因此,不需要使用Failsafe插件使用的pre-integration-test阶段,integration-test阶段,post-integration-test阶段.
pre-integration-test,post-integration-test阶段无需编写Maven插件?testng integration-testing maven maven-surefire-plugin maven-failsafe-plugin