In the statement, "33.08% is covered by 12.13 hits / lines", which means "hits / line"?

I recently worked with the rails project and generated a code coverage report using simplecov , I got a good report below. I know this is a simple question (I searched many times, but received no explanation)

can someone explain what hits / line means.

You can also say that I have a test.rb file (100 lines of code) that didn’t arrive at any time, now we can say that some test_script fell into some lines of the test.rb file, so the coverage calculated

 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

+4
source share
1 answer

, , . , . , , .

+6

Source: https://habr.com/ru/post/1523664/


All Articles