Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Coverage on Visual Studio Team System 2008 Developer Edition (on an NUnit application)

Is this possible? I am looking forward to a tutorial which explains the steps to achieve this.

like image 780
bhadra Avatar asked Jan 25 '23 01:01

bhadra


2 Answers

TestDriven.NET has the ability to test (NUnit/MSTest/etc) with Team Coverage (which you already have since you have Team System : Dev).

Walkthrough: here (you also get the coverage results window for looking at the coverage per method) - but this says it all:

Using TestDriven.NET with Team Coverage
(source: mutantdesign.co.uk)

You can use NUnit tests, but use the MS IDE integration for colorization, percentagaes, etc (no need for NCover). I use this all the time ;-p

The advantages are:

  • no need to set up a "Test Run Configuration" (sorry, MSFT, but an own-goal there)
  • fully integrated with VS (Code Coverage Results and Coloring)
  • easy to use (just right-click -> Test With -> Team Coverage)
  • easy to debug too (right-click -> Test With -> Debugger)
  • easy to use the separate NUnit/NCover apps if you want (right-click etc)
like image 130
Marc Gravell Avatar answered Jan 26 '23 13:01

Marc Gravell


Here's a tutorial on integrating NCover with MSBuild. Here's a tutorial on how to tell Team Build to fail a build when NCover reports code coverage below a minimum threshold. To my knowledge there isn't yet a way to publish your NCover results directly to the TFS data warehouse, but I'd love someone to prove me wrong.

like image 32
Mike Post Avatar answered Jan 26 '23 13:01

Mike Post