I'm working on a .NET project that uses Jenkins as the CI server. The server is working as it's supposed to but now I'm trying to make it emit alerts in case of low code coverage.
The approach that I'm trying is to use Sonar to execute NUnit and OpenCover, but I need to link the code coverage metrics from Sonar back to Jenkins and that's where the problem resides.
AFAIK the report generated from OpenCover (coverage-report.xml) as is, is not recognized from Jenkins so what I'm trying to do is to make them talk by a xsl file that transforms the (coverage-report.xml) to a (emma-report.xml) that Jenkins has plugins that understands.
Although I don't know it that is the best approach. Better approaches are more than welcome ;) I'm facing a problem to get the block coverage metrics from OpenCover (Emma needs this metric).
I've managed to transform all other metrics needed class, %, method, % and line, % from OpenCover to Emma, but I'm not sure if is possible to get the block, % from the report.
Can anyone tell me if it is possible or if there is a better approach to achieve what I'm trying to do (that is, make Jenkins emit build alerts when code coverage is bellow a certain percentage)?
Thanks in advance! :)