Amit_Naik
(Amit Naik)
November 12, 2020, 4:42am
1
I have integrate SonarCloud to my open source project, but not getting code coverage report as it Quality Profiles is not pointing to c#.
Could anyone help me how to enable code coverage for .net core C# project?
Sonar report (without code coverage) is as below https://sonarcloud.io/dashboard?id=Amitpnk_Hexagonal-Architecture-ASP.NET-Core
Hi @Amit_Naik and welcome to the community .
We would need a bit more context here.
Which CI tool are you using ?
Are you specifying by hand some of the coverage / test execution property while running your build / analysis ?
Thanks in advance.
Amit_Naik
(Amit Naik)
November 12, 2020, 10:50am
3
hi @mickaelcaro ,
thank you for your reply,
I am using SonarCloud Automatic Analysis and also tried with CircleCI, but Quality profile is set to html and xml, instead of c#
Below is my github project
QuickApp solution template which is built on Hexagonal Architecture with all essential feature, CI/CD, best practice, testing Strategy using the testing pyramid and documentation using .NET Core! -...
mickaelcaro
(Mickaël Caro)
November 12, 2020, 12:30pm
4
Hi @Amit_Naik
SonarCloud automatic analysis doesn’t support C# code for now. You’ll need to rely on something else.
Circle CI should be good, but you have to ensure that you use the SonarScanner for .NET in order to get your C# code analysed.
HTH
Mickaël
Amit_Naik
(Amit Naik)
November 13, 2020, 7:32am
5
Thank you so much @mickaelcaro ,
Do you have any documentation for SonarScanner integration to dotnet core project? it would be of great help
Regards,
Amit Naik
You can read our document on the Scanner itself, which can be found here . This is available in multiple “format” (dotnet core global tool, …) which may interest you.
HTH,
Mickaël
Amit_Naik
(Amit Naik)
November 13, 2020, 5:44pm
7
Thank you so much @mickaelcaro for your help.
I am able to enable code coverage for my project
system
(system)
Closed
November 20, 2020, 5:44pm
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.