java - 多模块项目中的 Java JaCoCo 集成报告
问题描述
我的项目具有以下结构,如下所示。我的集成测试在模块 A 中,它使用其他模块中的类。我希望 JaCoCo 包含由模块 A 执行的其他模块的代码覆盖率。
我知道该插件可以合并其他模块的报告,但这是一个不同的场景。我正在模块 A 上执行集成测试
pom.xml
|
|
-----sub module A - application layer - executable integration-test with submodule B & C
|
|
-----sub module B - business logic - has no integration test
|
|
-----sub module C - business logic - has no integration test
解决方案
我通过为每个模块添加以下属性解决了同样的问题:
<propertie>
<sonar.sources>target/generated-sources/java</sonar.sources>
</properties>
推荐阅读
- azure - 是否可以映射/重命名从 Azure 应用配置加载的键?
- python - 熊猫`at`与列表`append`
- wpf - 如何在 WPF 中的所有窗口上应用所有字体设置?
- powershell - Rename-Item 失败并显示“无法重命名,因为 'C:\Folder\ Example App Folder 中的项目”不存在
- python - 解封数据框会导致 TypeError
- google-apps-script - 通过 Google 表格中的单元格内容控制文本大小
- javascript - 2个javascript语句的范围问题
- python - Pandas groupby、bin 和 average
- pyspark - 将字符串(带时间戳)转换为 pyspark 中的时间戳
- python - 如何获取 set_index 第一个值