I am trying to get code coverage in cruisecontrol.net. Using the following NANT script:
<target name="code_coverage" description="finds the code covered with tests">
<exec program="${vstest_console}">
<arg value="/Settings:CodeCoverage.runsettings" />
<arg value="/EnableCodeCoverage" />
<arg value="Tests.dll"/>
</exec>
</target>
I am able to get a .coverage file. First of all the name of the .coverage file is coming as user name appended with current date time and under a folder named randomly. In .runsettings file documentation, i was unable to find anything about changing the name of .coverage file. I need to change name of this file. The bigger problem is that a sub-folder with some GUID type name is created into which the coverage file is dumped and it changes every time a test is run with code coverage ON.
Secondly can somebody help me in extracting covered path percentage out of this. I just need to fail the build, if coverage is below a point. Lot of help is available on Google but is of VS 2010 and before. I need help for VS 2012 or VS 2013. Currently am working on VS 2013 Ultimate and am using .runsettings file for code coverage.
Aucun commentaire:
Enregistrer un commentaire