当rcov生成报告时,它会显示每个文件的“总覆盖率”和“代码覆盖率”.这两个指标有什么区别?
解决方法
从
http://www.rubydoc.info/github/relevance/rcov/master/Rcov/FileStatistics起
total_coverage是:
Total coverage rate if comments are also considered “executable”,
given as a fraction
code_coverage是:
Code coverage rate: fraction of lines of code executed,relative to
the total amount of lines of code (loc).
除非项目的评论被认为是可执行的,否则最有价值的指标将是“代码覆盖率”.