gpt4 book ai didi

java - 为什么 Maven 中需要 Surefire 插件?

转载 作者:行者123 更新时间:2023-11-30 03:09:20 26 4
gpt4 key购买 nike

我使用 Maven 一段时间了。在我之前的项目中,我没有从头开始创建 pom.xml,而且我看到 Surefire 插件总是已经添加到 POM 中。

一开始我以为Maven必须要有Surefire才能搜索到要运行的测试java文件,但是即使我从POM中删除了Surefire插件,Maven仍然能够在src/test/java下找到测试用例.

Surefire 的目的是添加额外的功能,例如:

https://maven.apache.org/surefire/maven-surefire-plugin/

但运行“mvn test”并不是绝对必要的?

谢谢

最佳答案

第一行你doc您提供的内容是:

". It generates reports in two different file formats:"

报告非常重要,我想您在运行测试以检查覆盖率和其他统计数据后一定已经看过报告。

你的问题本身已经有答案了:)

关于java - 为什么 Maven 中需要 Surefire 插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33949658/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com