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
coverlet with vstest.console.exe not generating code coverage. #1580
Labels
Comments
Bertk
added
question
This issue is a question
and removed
untriaged
To be investigated
labels
Jan 13, 2024
Hi, could you please provide addition information:
Typically |
This issue is stale because it has been open for 3 months with no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Hello,
I’m trying to generate coverage to upload to sonar cloud.
tools I’m using.
using github actions when workflow completes I can see .coverage file which contains data. (almost what I can read in the .coverage file is references to project files)
xml generated after running test is as below: which seems empty and not generating any code coverage data.
Steps I’m following.
setup required tools. e.g. actions/checkout, actions/setup-java, NuGet/setup-nuget, microsoft/setup-msbuild, darenm/Setup-VSTest and downloading sonar-scanner from link https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/6.0.0.81631/sonar-scanner-6.0.0.81631-net-framework.zip
SonarScanner.MSBuild.exe begin /k:APPLICATION_NAME /d:sonar.token=MY_VALID_TOKEN
msbuild Application.sln -t:rebuild -property:Configuration=Release
coverlet C:\a\Repos\App\ –target “vstest.console.exe” --targetargs “**\bin*.Test*.dll /EnableCodeCoverage” --format “opencover” --output \coverage-reports\
SonarScanner.MSBuild.exe end /d:sonar.token=MY_VALID_TOKEN
In my application I’m unable to generate code-coverage.
.
.
.
and on other side,
I tried with a sample application with default template .Net Framework 4.8.
added few tests for default code.
which is working fine. In this sample application I can see coverage and xml as well. please have a look on below snapshot from sample app and github workflow.
In this sample application; I follow same steps, except SonarScanner.MSBuild.exe being and end.
please let me know if you want to take a look at my sample applications workflows .yml file.
Thanks,
Hardik
The text was updated successfully, but these errors were encountered: