-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple test projects #404
Comments
@Foshkey Thanks for submitting an issue! You might want to look into using the multi-root workspace functionality (see link from the example project or this link to vscode's docs). This will allow you to have multiple "folders" or projects open at one time and have the coverage be accessible across different projects. We can triage and investigate further if it is still an issue for you afterwords. |
Thanks for the response! Looks like it's still an issue. To be clear, our github repo is structured like so:
And opening the But, I tried adding all of the src project folders and test project folders to the workspace as separate folders like you suggested, but still the same issue that code gutters indicate no code coverage when all test projects are configured to output code coverage (but still works with just one project) |
A coworker of mine came up with the suggestion to merge the coverage results with the following test runner arguments:
And then add the setting for coverage gutters to pick up this file:
And this worked for me! Might be worth adding this to the docs for when people use multiple test projects. I didn't know that merging coverage results into one file was a thing! |
Excellent, thanks for finding that fix! Definitely we should add that to the readme / docs as folks with larger projects probably run into this all the time. |
what is the |
Probably related to the merging and keeping things in sequential order (based on the docs I found below). |
I am facing the same issue with an identical solution/project structure as OP. Projects I'm working on use VSTest integration for coverage, not MSBuild, so report merging is not an option. Judging from extension logs, the coverage files get detected correctly, but the extension only recognizes the first project's report.
(solution & project path names changed) Note: As a workaround, you can delete TestResults for all projects and run the coverage collection on a single project at a time. Makes the extension usable, but obviously suboptimal. |
Hmm the extension should find all the coverage reports within the open directory, are you able to open the project at a higher folder levels, so the extension can see the other reports? The example project in the repo has the by default if you need an example. |
Describe the bug
First of all, awesome extension. I'm looking for something similar to VS Live Testing and this might be it 😄 Also, apologies if I'm missing something obvious, I tried searching for this issue.
For dotnet, I managed to get this working when I add this package to just one test project:
But as soon as I add it to all of my test projects within the same workspace, all covered lines indicate no code coverage within all or all but one project. The
lcov.info
files are generated within their respective project directories, and I confirmed that they are all different.To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
All respective src code lines should indicate accurate code coverage
Screenshots
None, let me know if any screenshots are helpful!
Desktop (please complete the following information):
Additional context
The logs seem to indicate that the extension is indeed picking up all of the
lcov.info
files (removed sensitive file paths):The text was updated successfully, but these errors were encountered: