Sacha K
Sacha K

Reputation: 642

No code coverage in TFS build after 2015 upgrade

We were using TFS and VS 2013, everything was working fine. We upgraded to TFS and VS 2015. We added a new build server (Windows Server 2012 R2, Visual Studio 2015 Enterprise, DevExpress and Wix) to have a clean install.

The builds were failing Task could not find "LC.exe" using the SdkToolsPath "" ... so we changed the build template from DefaultTemplate.11.1.xaml to TfvcTemplate.12.xaml

Now it's building, but when we open the builds from the build explorer under code coverage we have No build code coverage data available. Code coverage is enabled in the build definition.

Upvotes: 1

Views: 1722

Answers (1)

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31075

Assuming you enabled Code coverage by going to the process tab of the build definition and then expanding the Tests--Automated tests--Test Source--Run settings, and change the Type of run settings from Default to CodeCoverageEnabled.

I have tried the same steps in TFS 2015, and I can't get Code coverage either in this way.

Instead, I tried the steps below, then I can get Code coverage now:

  1. Go to Process--Test--Automated tests--Test source in build definition.

  2. Now in Test source row, click the button with "...".

  3. Under "Options", select Enabled Code Coverage and save the build definition. No matter the Enabled Code Coverage option has been selected or not, you still need to save this edit. Now queue the build, you'll see the code coverage.

enter image description here

Upvotes: 3

Related Questions