The more tests I add, the lower the code coverage

Description

I’m adding more tests to my codebase, but since a few commits the code coverage keeps getting worse and worse.

Repository

CI/CD

Github Actions

Uploader

bash uploader

Commit SHAs

Additional Information

It seems that since a few commits some of the test files are seemed “untracked”. It resulted in a 2% dip of code coverage (while adding more tests)… and the latest commit actually dropped with 8% code coverage (with again, another test added).

I’m sure codecov works as intended, so i’m not reading things right, or doing things not correctly, but i’m not sure what i’m missing here.

I’m actually thinking that this might have to do with adding new directories. As soon as I add the first test-file in a directory, it will count the whole directory towards the code coverage (i think it skips it when no test files are found inside a dir)… not sure if i’m right though

Hi @jaytaph, I’m not sure I understand. Could you add a screenshot or two of what you are seeing? Right now, when I go to the commits tab, I see coverage going up.

Yes… it’s increasing again. After some investigation, it turned out to be what I was thinking: when you add a test in a new directory, all files in that directory will be counted so it can indeed decrease the overall in those cases.

1 Like