Code Coverage Metrics
See original GitHub issueHi, I would like to explore implementing test coverage metrics in our codebase. Ideally, we would have something that runs as part of our CI process that provides an overall test coverage metrics as well as the ability to drill down and see the contributing factors to those high level metrics. We can also have that information surfaced in some form in open PRs.
Here are what I see as the goals/benefits of that. Do these seem reasonable? Anything I’m missing that we’d like to call out?
Goals:
- Provide a baseline understanding of how thoroughly different parts of our codebase are tested.
- Help identify areas we’d like to test more thoroughly and if there are any areas that we feel are overly tested. This could result in
tech-debt
tasks to add coverage on certain areas, or allow us to mark tests we’d remove when they require upkeep. - Ensure we are intentional about increasing or decreasing code coverage over time through the PR process.
att. @desktop/maintainers
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
What is Code Coverage? | Atlassian
Code coverage is a metric that can help you understand how much of your source is tested. It's a very useful metric that...
Read more >Everything you need to know about code coverage - Codegrip
Code coverage is a software testing metric that determines the number of lines of code that is successfully validated under a test procedure,...
Read more >What is code coverage and how do YOU measure it?
Code coverage is a measurement of how many lines/blocks/arcs of your code are executed while the automated tests are running. Code coverage is...
Read more >The Real Problem with Code Coverage Metrics in 2020
This measures the number of lines of source code executed during a given test suite for a program. Tools that measure code coverage...
Read more >Code coverage - Wikipedia
Many different metrics can be used to calculate test coverage. Some of the most basic are the percentage of program subroutines and the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👍 to this work.
Some team-based ideas off the top of my head:
Some specific “nice to have” integration ideas:
Just noticed that Appveyor doesn’t have
gcov
installed - which is part of GCC - and it quietly errors (but still seems to succeed uploading code coverage):It might be cool to try out whether this can be disabled because the command line
yarn test:unit:cov
generates these JSON files that matchcoverage/*.json
: