sonarscan-dotnet
sonarscan-dotnet copied to clipboard
another sample of use to README file
I am adding an additional sample, which I use. If you like it accept it :).
Dockerfile needs some testing IMO. Let me know if you would like to do it differently. I've tried the 5.0 base image, and there are some issues with installing JDK. I can look into it tomorrow.
I've removed the a Dockerfile changes since someone else will PR those changes.
Thanks for example. Probably not a bade idea to have a complete example. Before I'll add anything I'll look into the differences between the test arguments in your example and mine.
I use the following packages related to testing
Microsoft.NET.Test.Sdk
xunit
xunit.runner.visualstudio
coverlet.collector
and use the test arguments
--logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
While you have these test packages (+ others like xunit or nunit?)
coverlet.msbuild
coverlet.collector
and use the test arguments
/p:CollectCoverage=true /p:CoverletOutputFormat=opencover
Probably achieves same thing in different ways.
I use xUnit yes. I do not collect any TRX files, just run the tests, and measure the coverage. Only coverage percentages are shown in the Sonarqube.
But I'll try to import TRX to Sonarqube by combining it with your example.