1

Scenario:

We're trying to enable code coverage in our TFS and so far the build summary result was successfully displaying code blocks covered as shown in picture below but the problem is every time we click Coverage Results link (arrow down in the picture) it doesn't shown the details of what has been covered and it display error in the browser even the test results In/Out folder have code coverage file in build server.

Setup:

enter image description here

MSTest Settings (Local.testsetting)

enter image description here

Test Run

enter image description here

Build Definition enter image description here

Test Results enter image description here

Build Summary:

enter image description here

After clicking Coverage Results: enter image description here

Question : Why TFS 2013 project collection Coverage Results link (red arrow down) in build summary doesn't display code coverage details of what has been covered even the code coverage file was generated in build server TFS 2010? What do we missed in the settings to make it possible?

jtabuloc
  • 2,479
  • 2
  • 17
  • 33

1 Answers1

1

You need to
1). open the build definition, go to Process -> 3.Test -> Automated Test -> on the Add/Edit Test Run dialog, set the Options to be "Enable Code Coverage".
2). Select the .testsettings file in the build definition.

enter image description here

You can also to have a check on Ralph Jansen's reply in this question TFS 2013 - No Code Coverage Results

Moreover, also check could you open this code coverage link in web portal.


Update

add related screenshot

enter image description here

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • Thank you for you're answer but as you can see in my **Test Run** picture there is no drop-down option to choose **Enable Code Coverage**. Enabling of Code Coverage was set on Test Setting pane (see my picture). – jtabuloc Sep 13 '16 at 10:51
  • @JrTabuloc It's not in the drop down, You need to click a button with `..` at the left of the bar. Details you can see my update screenshot. – PatrickLu-MSFT Sep 16 '16 at 09:53
  • I don't have that option. I'm using VS 2013 Ultimate. See my Build Definition Picture you will notice that I don't have that. May be we're using custom build template? – jtabuloc Sep 16 '16 at 10:32
  • Sorry for the later reply, you can try to use this [extension](https://visualstudiogallery.msdn.microsoft.com/86a239cf-b0e3-4af4-a6a2-319b135867c0) which allows you to update the default build process template used when creating a new build definition. Then try it again. – PatrickLu-MSFT Sep 19 '16 at 01:54