1

I'm trying to get Code Coverage results to display in the Build Summary and TFS Build Summary Reports. I have included a .testsettings file in my CI build to instrument the assemblies I am interested in.

This is what I see in the Build Summary (not showing the actual names):

0 error(s), 332 warning(s)
name1.sln ('publish;build' target(s)) - 0 error(s), 15 warning(s), View Log File
name2.sln - 0 error(s), 184 warning(s), View Log File
testsolution.sln - 0 error(s), 133 warning(s), View Log File
3 projects/solutions compiled
1 test run completed - 100% pass rate
No Code Coverage Results

Now, this "No Code Coverage Results" is confusing to me. If I download the test results, the code coverage appears in there. Also, I am able to view the data.coverage file on our build server. I've been searching for the past two days on Google and stack overflow, but have not found any solutions that have worked for me. Does anyone have an advice on how to get this working? We are using TFS 2012, VS 2012, and running tests using MSTest.

Chris
  • 43
  • 1
  • 3

1 Answers1

0

Firstly, edit the build definition and set Type of run settings to be CodeCoverageEnabled.

enter image description here

Then be sure "Enable Code Coverage" option is selected on the Add/Edit Test Run dialog. Save the build definition, and run again.
enter image description here

Additionally, it is worth for you to have a check on Ralph Jansen's reply in this link: TFS 2013 - No Code Coverage Results

Community
  • 1
  • 1
Vicky - MSFT
  • 4,970
  • 1
  • 14
  • 22
  • 1
    Thanks for the reply, but as stated in the original question, I am using MSTest, not Visual Studio Test Runner. – Chris Oct 27 '15 at 11:24