samJones;8852 wrote:ncrunch rocks!
Thanks! :)
samJones;8852 wrote:
One of our goals is to set up the build system/CI system to have a list of units and required coverage level per unit. E.g.
fileA.cs, 100
fileB.cs, 90
fileC.cs, 95
etc
So as we get coverage addressed (using ncrunch), we can enforce a certain level of coverage at build time. (e.g. if fileC.cs drops to %94 coverage, build fails)
Can ncrunch help us here?
NCrunch doesn't have anything that will do this out of the box, but it should be possible to implement your own solution by parsing the reports output by the NCrunch console tool on your CI server.
I recommend taking a look at the contents of these files. One of them is a raw code coverage XML data file that could easily be read by your own tool which is programmed with rules detailing code coverage targets per method. When one of the rules is broken, the tool could return a non-zero response and fail the build.