Starting the development of the new Tech Head Brothers in a remote multi developers environment I wanted to have some tooling to ease our work. For sure we have:

  1. A code repository: Subversion installed using VisualSVN server
  2. A continuous integration server: Team City

The continuous integration MSBuild script is doing the following steps:

  1. Compiling the code checked out by Team City
  2. Run NUnit tests
  3. Run NCover code coverage, that’s the new integration of today
  4. Precompile the website
  5. Package the website
  6. Deploy the website on IIS in a staging stage

In Team City I have two configuration settings for the Portal project:

  1. CI - Trunk - Unit Tests - Coverage - Deploy Staging: Run as Continuous integration with unit test, code coverage and deployment to iis
  2. Daily - Trunk - Duplicate Finder: Run daily and find duplicates in our code

Now for each build I can look at those information!

I can see that all my 35 tests passed, the changes made, the log of the build, Artifacts that I defined (more in a minute) and finally a new tab Code Coverage Summary.

The unit tests are ok for a start but needs some more work as we can see! But ins’t that cool to get the output directly in Team City! I love it.

And finally the artifacts tab

On this tab I get the output that is shown on the tab Code Coverage Summary as a file that I can download; CoverageSummary.html generated by MSBuild script using NCover, I also get the folder Coverage on which I can click on the index.html file to get a full report of NCover as you can see:

 

To get access to those Artifacts I needed to define in my settings the following:

And also modify the Team City server main-config.xml as described here with the following entries:

To integrate NCover into my Continuous Build process made with MSBuild script I used the documentation on that page.

Update: First take care that in the main-config there are already some report-tab configuration, and the name msut be unique. If the name is not unique then the first in the list will be taken. So I removed the predefined report-tab and modified the one from my last post to this: