NCover

NAnt Only Integration

The following is the typical scenario of how NCover fits into a continuous build process. It is designed to be easily slotted into a continuous build process such as CruiseControl.NET.
  1. Before you update from your source control system, run the nrecover task (to deinstrument your source files in case the previous build failed).
  2. Run ncover task to instrument your source code.
  3. Compile.
  4. Run your tests.
  5. Run ncoverreport task to generate your report.
  6. Run the nrecover task to deinstrument your source files.
Then all you need to do is add a link from the build website to point to the latest generated coverage report
(and keep those coverage percentages up!).

Multiple Reports

The ncover, nrecover and ncoverreport tasks each take a report name. To output multiple reports duplicate all calls to these three tasks with reportname='xxx'.

There is an example multiple report nant build file that creates two reports - ncover's own coverage and ncover's tests coverage. The second is designed to find dead code in tests (it's either obsolete code or not testing what you thought it was).