gradle - 如何在本地获得 JaCoCo 的整体覆盖?
问题描述
我有一个包含多个模块的 android 项目。主要模块是应用程序模块。
这是我所做的并且可以获得单独的报告。没有应用程序/构建报告。
zgong$ ./gradlew jacocoTestReport
zgong$ ls -la */build/reports/jacoco/jacocoTestReport/html/index.html
account/build/reports/jacoco/jacocoTestReport/html/index.html
bootstrap/build/reports/jacoco/jacocoTestReport/html/index.html
cards/build/reports/jacoco/jacocoTestReport/html/index.html
common/build/reports/jacoco/jacocoTestReport/html/index.html
explore/build/reports/jacoco/jacocoTestReport/html/index.html
launcher/build/reports/jacoco/jacocoTestReport/html/index.html
payment/build/reports/jacoco/jacocoTestReport/html/index.html
runtime/build/reports/jacoco/jacocoTestReport/html/index.html
settings/build/reports/jacoco/jacocoTestReport/html/index.html
transactions/build/reports/jacoco/jacocoTestReport/html/index.html
uibase/build/reports/jacoco/jacocoTestReport/html/index.html
widget/build/reports/jacoco/jacocoTestReport/html/index.html
我能得到像我在 Jenkins 报告中看到的那样的可视化报告吗?
解决方案
您需要将所有报告合并为一个。
这里有很多建议:https ://discuss.gradle.org/t/merge-jacoco-coverage-reports-for-multiproject-setups/12100/9
推荐阅读
- css - 缓动动画究竟何时到达其中点?
- c# - WCF 消息格式化程序未格式化故障消息
- amazon-web-services - Codedeploy:提供的目标组有目标类型实例,与任务定义中指定的awsvpc网络模式不兼容
- android - 在 Kotlin 协程中等待 LiveData 结果
- python - 多线程与多处理:选择哪一个?
- amazon-web-services - VueJS 中的 AWS Amplify API - apiName 是如何形成的?
- python - 如何将日期时间打印为 UTC 字符串
- node.js - Apollo graphQL:在查询深度级别结束时从数据加载器调用调度
- c# - 创建自定义 RequestCultureProvider - 为什么没有初始化 Options 属性?
- r - 如何使用 dcast() 将 5x2 data.table 转换为 1x5 data.tabe?