📘Looking for additional help?
See our video tutorial on diagnosing unexpected coverage changes at the bottom of this page.
There are many reasons why coverage may change in unexpected ways. Codecov analyzes the pull/commit diff, detecting coverage changes on both lines of code that changed and lines that were not changed.
Indirect coverage changes are differences of coverage to lines of code that are not adjusted in the pull/commit diff. This can occur for a number of reasons. In the UI we call these changes "indirect changes" - on the pull request page you will see an "indirect changes" tab and navigating there will bring you a list of all of the files impacted by indirect changes. More often than not an unexpected coverage change is an indirect change.
A simple example of this is removing tests, which is shown below.
## Unchanged source
def string_len(string):
return len(string)
## Removed test
- def test_my_method():
- assert string_len('jedi') == 4
In the code above, the developer removed a single test which changes the coverage of the method string_len
from being hit
to missed
.
This change in coverage will be surfaced in the Codecov App through our Changes page.
There are a number of reasons that cause line coverage to change unexpectedly. These can be due to:
👍Indirect Coverage Changes
Almost every example above will manifest as an indirect coverage change in the "indirect changes" portion of the pull request page shown in the screenshot below.
Indirect Changes tab of the pulls page
Most unexpected changes occur in the raw coverage report before Codecov processes the uploaded coverage file.
How to review the the coverage report for unexpected changes:
Codecov stores the raw, unprocessed report data precisely for this issue. Reports are archived indefinitely unless otherwise specified in YAML.
Example repository from video: https://github.com/kensho-technologies/graphql-compiler/pull/806
Updated over 1 year ago
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4