Formerly known as the "Codecov Delta"
This page describes how Codecov presents code coverage in both its app and the comment it adds in your code host. If you're looking for what code coverage is and how it is calculated, start here. If you're unfamiliar with the ins and outs of patch and project coverage, start here.
In the header of your PR are three numbers, the head coverage percent, the patch coverage percent, and the change percent.
- Head coverage percent is the line coverage of all your files in your head commit.
- Patch coverage percent is the line coverage of all the lines changed in your commit.
- Change percent is the percent that the overall project line coverage has changed from base to head.
There are three primary percentages on the pull request page within Codecov; the head file coverage %, the patch %, and the change. These three numbers together present a picture of how your coverage has changed in this pull request.
- Head file Coverage % is the coverage percentage of your files in the head of your PR
- Patch % is the coverage percentage of the number of lines touched in your patch (the git diff)
- Change is the difference in coverage percentage from the base to the head for this particular file within your pull request
These percentages are near identical to what's on a PR, but the comparison for change is a little different. In a pull request you compare a head to a base, but in a commit, the change is determined by comparing to the previous commit on your branch. These percentages are also specific to the commit itself, not the wider PR/MR that the commit is a part and allow you to see a more granular view of how your coverage is changing based on the work done in that single commit.
absolute <relative> (change) 35% <72%> (+4%)
There are three data points in the Coverage Δ (delta):
1: The project coverage. e.g., 35%.
"The entire project coverage is 35%."
2: The patch coverage. e.g., <72%>.
"The lines I changed in this commit are 72% covered."
Also read as
"The coverage of this commit's diff is 72%."
3: The change in project coverage. e.g., (+4%).
"This commit increased this project's coverage by 4%."
ørepresents "not affected" or "no change". This value could be found in the and (change) block of the Coverage Delta.
When found in the block, it represents that the coverage diff was not concerning coverage. (e.g a commit that only adjusts lines not tracked by coverage.)
When found in the (change) block, it represents that coverage did not change. (e.g.
0% change. The commit did not affect project coverage.)
Updated 9 days ago