I am working on a .NET project that uses Jenkins as a CI server. The server works as intended, but now I'm trying to get it to issue warnings in case of low code coverage .
The approach I'm trying to use Sonar to do is NUnit and OpenCover , but I need to link the coverage code metrics from Sonar to Jenkins > and thatβs where the problem is.
An AFAIK report created using OpenCover ( cover-report.xml ), as it is, is not recognized from Jenkins , so I'm trying to get them to say xsl, which converts ( cover-report.xml ) to ( emma-report.xml ) Jenkins has plugins that understand.
Although I do not know, this is the best approach. More efficient approaches are more than welcome;) I ran into the problem of getting block coverage metrics from OpenCover ( Emma needs this metric).
I managed to convert all the other metrics needed by class, % , method, % and line, % from OpenCover to Emma , but I'm not sure if you can get block, % from the report.
Can someone tell me if this is possible, or if there is a better approach to achieving what I am trying to do (i.e. make Jenkins emit build warnings when the code coverage is below a certain percentage)
Thanks in advance!:)
Matheus
source share