Skip to content

Commit 0472912

Browse files
Merge pull request #76 from Bai-Li-NOAA/patch-2
docs: clarify Hits/Line example in coverage report
2 parents c3f7370 + 58303b5 commit 0472912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inst/package/codecoverage_explanation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Covered = Number of lines covered by a test
88
- Missed = Number of lines not covered by a test
99
- Hits/Line = Corresponds to the average number of times specific lines are tested in the file.
10-
+ In other words, if I have an 11-lines file where (1) the first 6 lines are tested 4 times, (2) the seventh is tested 1 time, (3) the last 4 are tested 10 times. The calculation is then: ((6 * 4) + 1 + (10 * 4))/11 = 6. This gives the average number of times a line is tested, here 6.
10+
+ In other words, if I have an 11-lines file where (1) the first 6 lines are tested 4 times, (2) the seventh is tested 1 time, (3) the last 4 are tested 10 times. The calculation is then: ((6 * 4) + (1 * 1) + (4 * 10))/11 = 6. This gives the average number of times a line is tested, here 6.
1111
- Coverage = corresponds to the percentage of lines covered by a test. Calculation: Covered / Relevant * 100, number of lines covered by a test divided by the number of lines requiring testing.
1212
- If we go into detail by file, the color code is as follows:
1313
- green line = line tested by at least one test (the x? corresponds to the number of times the line is tested)

0 commit comments

Comments
 (0)