Recently I was working with rails project , and generated a code coverage report using simplecov, I got a nice report , below. I know it's a simple question ( I googled many times but not getting any proper explanation)
can anyone explain what does hits/line mean.
Also lets say I have a file test.rb (100 lines of code )which was not hit anytime , now lets say some test_script has hit some lines of file test.rb so will the coverage calculated by
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
I believe it's the number of times each specific line was run during your suite. You can view line-by-line metrics by inspecting each file individually. The numbers you see displayed more prominently are averages over whole files or groups of files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With