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
Hi. I used OpenCover 4.6.519 and Fake (F#) for running of Sonar scanner, msbuild and opencover step-by-step. After migration from Sonarqube 5.5 to Sonarqube 6.7.4 I start to use newest version of Sonar Scanner and receive different code coverage results (from ~86% to ~20%).
I checked the coverage measures and found that amount of unit tests (nunit) are the same (for both 5.5 and 6.7) but different line of codes and uncovered lines and etc.
In Treemap found that for 6.7.4 multiple objects are in place, which must be excluded by opencover filters ( -[Tests]* and etc).
OpenCover versions are the same
Configurations and cli commands are the same (filters, scanning jobs, opencover and scanner parameters. See Repro steps)
sonar.coverrage.exclusions are not used
ReportGenerator shows almost the same results for each test coverage results.
Tried to use different versions of Sonar Scanner for MSBuild:
Sonarqube 6.7.4+Sonar scanner for msbuild 3.0.x + sonarc# 7.1 (build 5212) + OpenCover 4.6.519= coverage 45% (multiple objects were included, but must be excluded)
Sonarqube 6.7.4+Sonar scanner for msbuild 4.3.1.1372 (net46) + sonarc# 7.1 (build 5212) + OpenCover 4.6.519= coverage 19% (multiple objects were included, but must be excluded)
Repro steps
D:\tools/MSBuild.SonarQube.Runner/SonarQube.Scanner.MSBuild.exe begin /k:"APP.TEST" /n:"APP.TEST" /v:"1.12-a2d43676" /d:sonar.cs.nunit.reportsPaths=D:\build\output\tests\TestResults.xml /d:sonar.cs.opencover.reportsPaths=D:\build\output\tests\opencoverresults.xml /d:sonar.cpd.cs.minimumLines=3 /d:sonar.cpd.cs.minimumTokens=50 /d:sonar.exclusions=**/*.Designer.cs,**/jquery*.js,**/raphael.js,**/modernizr*.js,**/swfobject*.js,**/waypoints*.js,**/effects.core*.js,**/respond*.js,**/enquire*.js,**/AssemblyInfo.cs,**/AssemblyBusinessLogicInfo.cs,**/GlobalAssemblyInfo.cs,**/AssemblyVersion.cs
Description
Hi. I used OpenCover 4.6.519 and Fake (F#) for running of Sonar scanner, msbuild and opencover step-by-step. After migration from Sonarqube 5.5 to Sonarqube 6.7.4 I start to use newest version of Sonar Scanner and receive different code coverage results (from ~86% to ~20%).
Tried to use different versions of Sonar Scanner for MSBuild:
Repro steps
Expected behavior
The same code coverage results in sonarqube with different sonar scanners
Actual behavior
Different code coverage results due to including filtered objects
Known workarounds
Missed
Related information
The text was updated successfully, but these errors were encountered: