Maven 中集成测试的 Cobertura 覆盖率
我可以调用 mvn cobertura:cobertura
来检测、运行单元测试(使用 surefire
)并生成报告。
我可以调用 mvn verify
来运行单元测试和集成测试(使用 failsafe
Maven 插件)。
但如何调用 Maven 来检测、运行单元测试和集成测试并生成报告呢? 使用 Cobertura Maven 插件运行集成测试的答案不适用于我,而且我不想在每次 Cobertura 运行时调用 verify
,但仅限于夜间报道。
I can invoke mvn cobertura:cobertura
to instrument, run unit tests (using surefire
), and generate reports.
I can invoke mvn verify
to run unit tests and integration tests (using the failsafe
Maven plugin).
But how do I call Maven to instrument, run unit tests and integration tests, and generate reports? The answer to Running integration tests with Cobertura Maven plugin did not work for me, and also I would not want to call verify
with every Cobertura run, but only for nightly coverage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不确定我是否完全理解这个问题,但我总是做一个
mvn site
...Not sure if I fully understand the question, but I always do a
mvn site
...您可以尝试 Jacoco 并获得具有更灵活配置的动态仪器,用于收集覆盖范围和报告
You can try Jacoco and got on fly instrumentation with more flexible configuration for gathering of coverage and reporting