Pete Stensønes
Pete Stensønes

Reputation: 5665

TFS 2010 server build code coverage not shown in TFS "code coverage" dashboard chart

I am having a problem with the TFS SharePoint portals code coverage chart.

We have a .NET 4 solution that is being developed TDD, as a result we have pretty good code coverage, but as a quality check I want to monitor the code coverage rates as the project progresses.

To this end I have a test configuration (a .testsettings file in the solution) which is configured to instrument our soluton assemblies for code coverage and two team build definitions that use that test definition.

Both team builds (one is a CI trigger, the other a nightly shceduled trigger) work and produce code coverage figures

team build result extract

However despite sheduled team builds with code coverage the dashboard "code coverage" excel report always shows 0% coverage, in fact the excel spreadsheet containing the report does not contain any data. This is rather unexpected!

So my question boils down to what steps have I missed to make code coverage data from team builds show up in the TFS database used by the excel code coverage report?

As a side note the SSRS reports are also showing code coverage from the builds, it just seems to be the Excel spreadsheets that fail to see data.

UPDATE

It seems the problem is the filter "Is Build Verification Run" when this filter is removed I see data. Specifically in my template (MSF for agile v5.0) the version of "code coverage" had a filter applied restricting output to just the "Other" value. Very odd.

enter image description here

When I am back in the office I'll try creating a new project based on the MSF Agile 5.0 tempate and see if this odd filter setting is part of it, or something I did in the past to this project!

Upvotes: 2

Views: 804

Answers (1)

Pete Stensønes
Pete Stensønes

Reputation: 5665

I have verified this by creating a new project from the MSF For Agile Software Developmnet v5.0 template.

This turns out to be what I percieve as a bug in the "MSF For Agile Software Developmnet v5.0" template.

When the project is created the excel spreadhseet used for the "code coverage" chart in the dashboards has a filter on it restricting the data to just items whose origin is "other" this excludes code coverage data from a TFS build which has this value set to "true" in the cube.

Simply clearing the filter or including "true" in it resolves the issue and shows you your TFS build code coverage data.

Upvotes: 2

Related Questions