【发布时间】:2014-01-25 07:47:17
【问题描述】:
最近我在使用 rails 项目,并使用simplecov 生成了一份代码覆盖率报告,我得到了一份不错的报告,如下所示。我知道这是一个简单的问题(我用谷歌搜索了很多次,但没有得到任何正确的解释)
谁能解释 hits/line 是什么意思。
还可以说我有一个文件 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
【问题讨论】:
标签: testing code-coverage simplecov