When I push my project to gitlab, Gitlab-CI runs my test suite, and says which lines were hit by the test run, and which were missed in each file (total coverage is 90%).
For instance, it can tell you that your tests cover only one branch (e.g. the if), but not another (the matching else), or if one of your functions isn't covered at all.
No problem. If you're not familiar with testing, I'd encourage you to look at unit testing tutorials for the language you work with.
For JavaScript, I love jest. For Python, pytest is great. They both support coverage reports, though I'm not sure if jest generates one as HTML or only in the CLI.
There's plenty of tutorials on YouTube, probably some on here too.
I apologize, but can you explain what "code coverage" is? #newb
You can see an example report coverage here, from one of my projects.
When I push my project to gitlab, Gitlab-CI runs my test suite, and says which lines were hit by the test run, and which were missed in each file (total coverage is 90%).
For instance, it can tell you that your tests cover only one branch (e.g. the
if
), but not another (the matchingelse
), or if one of your functions isn't covered at all.Thank you.
No problem. If you're not familiar with testing, I'd encourage you to look at unit testing tutorials for the language you work with.
For JavaScript, I love jest. For Python,
pytest
is great. They both support coverage reports, though I'm not sure if jest generates one as HTML or only in the CLI.There's plenty of tutorials on YouTube, probably some on here too.
It's a term for what percentage of your app is covered by tests.