gpt4 book ai didi

testing - 在语句 "33.08% covered at 12.13 hits/line"中,hits/line 是什么意思?

转载 作者:行者123 更新时间:2023-11-28 19:49:07 25 4
gpt4 key购买 nike

最近我在使用 rails 项目,并使用 simplecov 生成了代码覆盖率报告。 ,我在下面得到了一份不错的报告。我知道这是一个简单的问题(我搜索了很多次但没有得到任何正确的解释)

can anyone explain what does hits/line mean.

还可以说我有一个文件 test.rb(100 行代码),它在任何时候都没有命中,现在可以说一些 test_script 命中了文件 test.rb 的一些行,因此覆盖率将由

 total no.of lines hit / total lines of code , (All files) 
OR
lines hit / total lines of code (file1) .+.+....lines hit/ total line of code (file n) / total number of file count

enter image description here

最佳答案

我相信这是在您的套件中每条特定线路运行的次数。您可以通过单独检查每个文件来逐行查看指标。您看到更突出显示的数字是整个文件或文件组的平均值。

关于testing - 在语句 "33.08% covered at 12.13 hits/line"中,hits/line 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21348070/

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