question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No coverage in SUT files (only in test files)

See original GitHub issue

Describe 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:

  1. Generate a lcov.info file with AltCover
  2. Check the lcov.info file is in the root of the solution folder
  3. Press watch in VS status bar
  4. 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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanlukercommented, Jul 22, 2019

@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 the PoC 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.

0reactions
ryanlukercommented, Aug 1, 2021

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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found