I have been trying to sort out why our code coverage numbers between Visual Studio and SonarQube do not agree. We have integrated SonarQube into our builds and everything seems to be working well. We build the solution in Visual Studio 2015 and then execute unit tests while gathering code coverage. We get the associated .coverage and .coveragexml files normally. The SonarQube process appears to parse the .coveragexml file and upload its contents. However, the reported code coverage values are not in line with the files generated by the testing.
For example, in this project, I see that the CustomSetting class shows 50% coverage as shown in the .coverage file and the .coveragexml file:
However, in the SonarQube report, the same class is showing 100% coverage:
Can someone explain why this is happening and what I can do to make the reports match one another?
SQ Version 7.6 (build 21501)