本文介绍了Maven Surefire和Maven Failsafe插件之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Maven Surefire和Maven Failsafe插件之间有什么区别?
我在网上搜索了所有内容,但没有得到答案.

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

推荐答案

简单来说,Failsafe插件旨在运行集成测试,而Surefire可以运行单元测试

In simple words, the Failsafe plugin is designed to run integration tests while Surefire to run unit tests.

Maven常见问题解答:

maven-failsafe-plugin 设计用于运行集成测试,并在实际运行测试失败的情况下将失败的构建解耦.

maven-failsafe-plugin is designed for running integration tests, and decouples failing the build if there are test failures from actually running the tests.

之所以选择名称" failsafe ",是因为它是surefire的同义词,并且因为它暗示了当它失败时,它是以安全的方式这样做的.

The name "failsafe" was chosen both because it is a synonym of surefire and because it implies that when it fails, it does so in a safe way.

故障安全插件有两个目标:

  • failsafe:integration-test runs the integration tests of an application,
  • failsafe:verify verifies that the integration tests of an application passed.

另请参阅:

这篇关于Maven Surefire和Maven Failsafe插件之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-24 19:41