NCover Documentation

Jenkins Integration

NCover 3 used build tasks for coverage and reporting, but the current version of NCover doesn't require them. This is because the build platform isn't as important as the process that's running your unit tests. The key to covering any build with NCover is profiling the test runner.

If you're running MSTest in your build, then you set up an NCover project to monitor qtagent. If you're running NUnit, set up a project to monitor nunit-agent.

Most build server coverage scenarios use the NCover Run command in the build script to isolate the coverage results to a specific NCover project:

There is no longer a separate NCover Reporting application. However, many Jenkins users generate and display the NCover summary report using the Jenkins HTML Publisher.

Jenkins HTML Publisher

Jenkins has an html publisher plug-in that was originally designed for NCover 3, but now has been generalized for use with any html report:

https://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin

There's no special integration between NCover and Jenkins. The Jenkins publisher simply looks for any html files in a directory you specify, and displays them in one or more tabs on the reports page.

Coverage Summary Report

NCover has a Coverage Summary html report suitable for display on the Jenkins Dashboard.

Note that the NCover Coverage Summary html requires an HTML5 compatible browser like IE9, FireFox (14 and higher) or Chrome (20 or higher). Otherwise, the Coverage Summary won't be displayed properly in the Jenkins Dashboard.

When displaying the Coverage Summary html in Jenkins (or anywhere else), keep in mind that clicking on different sections of the report will open embedded links back to NCover.

Desktop does not server external pages, so the links in a report generated from Desktop will point back to local host (127.0.0.1). Code Central, however, generates shareable reports, so that any user who can access the Code Central server and has a valid login (created by the CC admin) can view the coverage data in the links from the Coverage Summary.

Here's the basic syntax of NCover Report, which will generate a report from the most recent execution in the project you specify:

ncover report --project="MyProject" --file="C:\MyCoverageReport"

The command line section page has more details on the NCover Report command, including other parameters you might want to use.

If you still need technical assistance, we can help:

Submit A Support Ticket

Try NCover Free Contact Us Online