NCover 1.5.8 - Access is denied. Error processing resource

NCover 1.5.8 - Access is denied. Error processing resource

This is the error message that I am getting.

   Access is denied. Error processing resource

   'file:///C:/Documents and Settings/richardr/coverage.xsl'.

 

It turned out that in the Coverage.xml file, the .xsl file it was looking for was "coverage.xsl" and the name of the file was "Coverage.xsl", the case of the first letter was off.  It was a simple fix, just open the Coverage.xml file in notepad and rename the 'coverage.xsl' to 'Coverage.xsl'.


Re: fail when coverage falls below a threshold?

Yes, you need to use the <ncoverexplorer/> NAnt task (from the NCoverExplorer.Extras package).  Then you can set the satisfactoryCoverage attribute to 85% and set the failMinimum attribute to true.  This is detailed in the NCoverExplorer.Extras documentation.


Re: fail when coverage falls below a threshold?

thanks - i've got this working. i've actually set failMinimum to false, because when the build fails it's hard to see why it failed if you're not familiar with NCover and the whole concept of test coverage: the error message is of the "external program failed" variety. something like "test coverage does not meet the required minimum" would be nicer IMHO.

(the main reason i'm using this is to gently prod the other devs if they start adding too much untested code to the project. if the build breaks with some cryptic error message they don't understand, they may just throw their hands in the air and stop maintaining the CI build at all, which would be gutting!)


Re: fail when coverage falls below a threshold?

Agreed.  I have a similar issue with FxCop.