No coverage in SUT files (only in test files)
See original GitHub issueDescribe the bug
The extension finds the lcov.info
file and display the coverage but only in the test project and not in the SUT.
To Reproduce Steps to reproduce the behaviour:
- Generate a lcov.info file with AltCover
- Check the
lcov.info
file is in the root of the solution folder - Press watch in VS status bar
- Open an file (.cs) of the SUT project
Expected behaviour It is expected to see the coverage in red and/or green color
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu 18.04
- Extension Version: 2.3.1
- VSCode Version: 1.32.1
Additional context
The lcov.info
file seems to contain all the information because when I do genhtml lcov.info
the generated report contains the correct coverage and the metrics are right. Also, the extension shows me the coverage when I open a test file but no when I open a tested file.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
python - How do I make coverage include not tested files?
The problem I'm having is that coverage is telling I have 44% code coverage and is only counting the files that: were tested...
Read more >Jest is "stuck" on only generating coverage for tested files ...
I've tried creating a whole new config, one with coverage and one without, and then just running the base command, and that doesn't...
Read more >Integration tests in ASP.NET Core | Microsoft Learn
Sets the content root to the SUT's project root so that static files and pages/views are found when the tests are executed.
Read more >How to test services, endpoints, and repositories in Spring Boot
I usually defend the argument that code without unit tests is dead code. ... a new feature to some code which is not...
Read more >Running large tests - Grafana k6
The amount of CPU you need depends on your test files (sometimes called test ... Code like this runs fine when the system...
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 Free
Top 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
@lontivero Thanks for the extensive logging! based on the output I see what is wrong but not why, you can see that only the
PoC.Tests
files are getting coverage information while each of thePoC
have empty coverages for each file.I will take a look at this with the 2.4.1 milestone to see if I can figure out why the lcov you pasted earlier (which looked to have proper coverage) doesn’t have a correct output on the extension side.
Closing due to staleness. We have added support for multi root / workspaces, so this potentially is fixed (if not it can be reopened or a new ticket made).