简体   繁体   中英

SonarQube C# CodeCoverage shows only line coverage

SonarQube only shows 'Line coverage' in code coverage widget. To be precise, it shows 'Code coverage : 73.3%, Line coverage: 73.3%'. No class coverage, neither blocks. But looking at my xml file with coverage data that I'm getting with VS CodeCoverage tool, it is there:

<module name="my.dll" path="my.dll" id="651BE0F83674FD4490D9E626C9DE4DE801000000" block_coverage="89.88" line_coverage="88.60" blocks_covered="231" blocks_not_covered="26" lines_covered="202" lines_partially_covered="3" lines_not_covered="23">
...
<module name="my2.dll" path="my2.dll" id="FE4C13CB7F7E104F982F937F4FDF113F01000000" block_coverage="70.17" line_coverage="74.35" blocks_covered="814" blocks_not_covered="346" lines_covered="687" lines_partially_covered="9" lines_not_covered="228">

You can see the lines/blocks coverage numbers.

I've running sonarqube 5.1.2, msbuild.runner for it.

Not sure what you want to see, Indeed there is only line and branch coverage, from here you can drill down to files/class

To get branch coverage you need to use opencover

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM