You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to generate coverage to upload to sonar cloud.
tools I’m using.
.Net Framwork 4.8
SonarScanner.Msbuild.exe
VStest.console.exe
coverlet
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.
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:
Hi, could you please provide addition information:
Configuration (please complete the following information):
Please provide more information on your .NET configuration:
Which coverlet package and version was used?
Which version of .NET is the code running on?
What OS and version, and what distro if applicable?
What is the architecture (x64, x86, ARM, ARM64)?
Do you know whether it is specific to that configuration?
Typically dotnet test and coverlet.collector are the recommended tools and before running the test a dotnet publish might be helpful. Why do you use msbuild instead of dotnet?
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: