gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 05:56:15 25 4
gpt4 key购买 nike

是否可以在 SonarQube 中分别查看/显示单元测试覆盖率和集成测试覆盖率?笔记;我正在使用 SonarQube 的 JaCoCo 插件

最佳答案

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

这种可能性在 6.2 中出于充分的原因被放弃 -> 请查看博客文章

//编辑:抱歉,我没电了,后续

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

曾经有一篇关于它的很好的博客文章,但我找不到了 -> 有关 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.

关于SonarQube,分别是单元测试覆盖率和集成测试覆盖率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50230161/

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