All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

[Codecov] What is the difference between patch and project coverage?

Post cover: [Codecov] What is the difference between patch and project coverage?
Table of contentsClick link to navigate to the desired location
This content has been automatically translated from Ukrainian.
Codecov is a service for analyzing code coverage by tests, which integrates with CI/CD and shows which part of the code is actually executed during testing. The service has two main metrics: patch and project coverage. They are different, and it is important to understand this in order to correctly assess the results in pull requests.
ΠŸΡ€ΠΈΠΊΠ»Π°Π΄ ΠΏΠΎΠΊΠ°Π·Π½ΠΈΠΊΠ° покриття Codecov Patch
ΠŸΡ€ΠΈΠΊΠ»Π°Π΄ ΠΏΠΎΠΊΠ°Π·Π½ΠΈΠΊΠ° покриття Codecov Patch

What is Patch coverage?

Patch coverage is the coverage of tests only for those lines of code that have been changed in a specific PR. That is, if you added or modified several methods, Codecov will show how well these changes are covered. This helps to focus on the quality of new or updated parts of the code.

What is Project coverage?

Project coverage is the overall picture. It shows the percentage of test coverage for the entire project on the current branch. Even if the changes in the PR are well covered by tests, if there are few tests overall in the project, this metric will be low.
Therefore, ideally, it is worth monitoring both metrics: so that the new code has good patch coverage and does not worsen the overall project coverage.

This post doesn't have any additions from the author yet.

What is debounce in JavaScript and why is it important?
21 Mar 16:39

What is debounce in JavaScript and why is it important?

meme code
meme code@memecode
What is CFB (Cipher Feedback)?
21 Mar 16:53

What is CFB (Cipher Feedback)?

meme code
meme code@memecode
What is XOR and how does it work?
21 Mar 17:05

What is XOR and how does it work?

meme code
meme code@memecode
Embedded programming: what it is and how to get started
24 Mar 16:48

Embedded programming: what it is and how to get started

meme code
meme code@memecode
Pessimistic Lock in Rails: what it is and when to use it. What are the alternatives?
31 Mar 17:45

Pessimistic Lock in Rails: what it is and when to use it. What are the alternatives?

meme code
meme code@memecode
Why does PostgreSQL skip IDs when saving new records? (Heroku)
31 Mar 19:13

Why does PostgreSQL skip IDs when saving new records? (Heroku)

meme code
meme code@memecode
How do Scratch courses help children develop soft skills?
11 Apr 18:24

How do Scratch courses help children develop soft skills?

meme code
meme code@memecode
24 Apr 20:17

Fixing minikube "You are trying to run the amd64 binary on an M1 system."

meme code
meme code@memecode
24 Apr 20:55

Fixing minikube on Mac with M1 (abandoning qemu, running on docker)

meme code
meme code@memecode
Where to find an older version of Google Chrome and download it? Using an old Mac as an example.
25 Apr 23:02

Where to find an older version of Google Chrome and download it? Using an old Mac as an example.

meme code
meme code@memecode
09 May 19:27

[FIXED] cannot load such file -- html/pipeline (LoadError) occurs during rails generate thredded:install

meme code
meme code@memecode
Task: Convert a Roman numeral to decimal (Ruby)
20 May 12:05

Task: Convert a Roman numeral to decimal (Ruby)

meme code
meme code@memecode