SonarQube,单元测试覆盖率和集成测试覆盖率分别

SonarQube, Unit test coverage and integration test coverage separately

是否可以在 SonarQube 中 see/show 单元测试覆盖率和集成测试覆盖率分开? 笔记;我正在为 SonarQube 使用 JaCoCo 插件

https://blog.sonarsource.com/sonarqube-6-2-in-screenshots

这种可能性在 6.2 中被放弃是有充分理由的 -> 请查看博客 post

// 编辑:对不起,我没电了,跟进

它被整合的原因是,除了声纳插件之外,大多数插件几乎没有提供 none 集成、烟雾、单元和任何覆盖范围之间的足够区分。

曾经有一个很好的博客 post 关于它,但我找不到了 -> 关于 6.2 的信息。只是版本,他们将所有这些合并为一个整体覆盖范围。

所以目前还没有办法将 Coverage 分成多个不同的版本。

补充阅读和更好的解释可以在sonarsource的jira ticket中找到: https://jira.sonarsource.com/browse/MMF-345

Some problems

We're dealing with multiple coverage tools that provide non-homogeneous data. Some provide only aggregate, project-level coverage metrics; some provide file-level coverage data; and others provide line-by-line coverage data. Calculating project coverage across multiple languages that use tools that provide disparate data sets is a nightmare.

How do you compute Overall Coverage for conditions? If the Unit Test data says 2 of 4 conditions on a line are covered, and the Integration Test data says 2 of 4 are covered... is that a total coverage of 2, 3, or 4 of 4?

How do you compute coverage for a project when the report(s) only contain data on a subset of files? Are they missing from the data because they're not executable or because they're not covered at all and were 'missed' by the coverage engine?

How do you recognize which files are "testable" in order to force overage to 0 on them? E.G. not all .java files with nLoC are testable (interfaces) Some projects only have integration tests; it is their primary means of testing. But Integration Tests are treated differently in terms of metric calculation than Unit tests. How to have a single QG? Solution would be Overall coverage but we are back to aggregation issue. BTW overall coverage is no more displayed in UI.