Niraj
(Niraj kumar sinha)
September 19, 2024, 8:23am
1
Hi
I am getting issue while trying to generate new code coverage in SonarQube. Below sonar configuration i am using.
-Dsonar.projectKey=%PROJECT_KEY_UI% -Dsonar.projectBaseDir=%RELEASE_WORKSPACE% -Dsonar.projectName=%PROJECT_NAME_UI% -Dsonar.projectVersion=%REPORT_VERSION% -Dsonar.sources=%RELEASE_WORKSPACE%\1.SourceCode\OC -Dsonar.sourceEncoding=UTF-8 -Dsonar.cs.opencover.reportsPaths=%RELEASE_WORKSPACE%\generated\results.xml -Dsonar.cs.nunit.reportsPaths=%RELEASE_WORKSPACE%\generated\nunit-result.xml
Below are the sonarqube dashboard.
Please suggest why i am not getting new code coverage.
ganncamp
(G Ann Campbell)
September 20, 2024, 3:43pm
2
Hi,
This:
implies a C# project. But this:
Niraj kumar sinha:
-D[property]=[key]
implies you’re not using the SonarScanner for .NET , which is required for .NET analysis.
HTH,
Ann
Niraj
(Niraj kumar sinha)
September 30, 2024, 6:02am
3
Hi Ann
Thanks for your quick response.
Using the same configuration in Jenkins freestyle job working fine we are getting new code coverage.
But when I configure in pipeline as code for that not getting new code coverage.
ganncamp
(G Ann Campbell)
September 30, 2024, 11:59am
4
Hi,
I don’t know what to tell you. If it’s a .NET project, you should be using the SonarScanner for .NET . Here are the docs for .NET coverage .
HTH,
Ann
Niraj
(Niraj kumar sinha)
September 30, 2024, 12:12pm
5
Hi Ann
I am already using sonarscanner for
Net.
Niraj
(Niraj kumar sinha)
September 30, 2024, 12:13pm
6
When i exected sonar analysis in different sonarqube server there i am getting new code coverage.
ganncamp
(G Ann Campbell)
September 30, 2024, 1:09pm
7
Hi,
What is the difference between your two servers? And what is the difference is how you’re executing analysis for the two?
Ann