How do I turn on code coverage for TFS 2013

Today I created a simple build for TFS 2013 and wanted to collect code coverage results during the build.  Couldn’t figure out how to turn on code coverage!  So here are the steps:

1) Edit your build definition

2) Open the Test Node, open the Automated test node and click on Test Source

SNAGHTML1025f9d

3) Click on the ellipses at the end of test source

SNAGHTML1032b2b

4) This will open up the Add/Edit Test run dialog

SNAGHTML103c910

5) Click on the options drop down and select Enable Code Coverage and click Ok

SNAGHTML10464a5

6) Open up the Run settings node

7) make sure Type of run settings is CodeCoverageEnabled

SNAGHTML1065ccb

8) Save your build definition and run your build.  You should now collect code coverage information.

Leave a Reply

Your email address will not be published. Required fields are marked *