Archive and publish .NET code coverage HTML reports from NCover
The post-build action when configuring a project:
The coverage project/build action which sends you to the archived HTML report:
Configuring the NCover Plugin
- Install the NCover plugin (via Manage Hudson -> Manage Plugins -> Available, check "NCover", and click the "Install" button at the bottom)
- Configure your project's build script to generate NCover HTML reports (See below for an example with Gallio)
- Enable the "Publisher NCover HTML report" publisher
- Specify the HTML report directory which is generated by NCover, relative to the project workspace.
Generating NCover HTML reports
For generic help on this topic, see http://docs.ncover.com/how-to/create-ncover-reports/
When using Gallio, you can simply use the NCover runner. You'll need to pass two arguments to Gallio.Echo.exe. Make sure to replace the variables in caps with the actual path you want:
- /runner-property:NCoverArguments="//html HTML_DIR_NAME //at TRENDS_FILE"
- The "//at TRENDS_FILE" is optional but will keep track of coverage over time and include graphs in your HTML report
An example command might look like:
C:\Program Files\Gallio\bin\Gallio.Echo.exe "C:\path\to\your.dll"
/runner-property:NCoverArguments="//html artifacts\coverage-html //at ncover3.trend"
Version 0.2.6 (2009/07/28)
- Improve compatibility with older Java versions including 1.4
- Remove debug logging that was ending up in the build log
Version 0.2.5 (2009/07/16)
- Allow for a report page to be named index.html instead of stomping over it
- Add "Back to Hudson" link
- Drop the filename extension from the tab names
Version 0.2.0 (UNRELEASED)
- Allow specifying multiple HTML files to be shown by separating with commas, and show in tabs
Version 0.1.0 (UNRELEASED)
- Initial release, allowing for archiving and displaying of NCover HTML coverage report directories.