In order to show how to enable Code Coverage analysis during TFS 2010 build I will use Microsoft Virtual Machine from Brian Keller.
In TailSpin Toys sample project there is a manual build called Tailspin Toys – Iteration 2. This contains some sample Unit Tests that are executed, but without code coverage analysis.
In order to activate it:
- Open the solution in Iteration 2
- Change file testsettings with Test –> Edit Test Settings –> Trace and Test Impact
- Data And Diagnostics
- Select checkbox Code Coverage
- Press Configure
- Select all assemblies to be checked for Code Coverage
- OK –> Apply –> Close
- checkin the modified ...