开发者

How to add custom statistics to a TFS 2010 build?

I want to integrate the execution of a custom to开发者_运维问答ol to our build (say CLOC, to gather LOCs by language) in TFS 2010. I know I can do that by creating a custom activity that I can then integrate into a custom template (or simply use the InvokeProcess activity).

The real question is that I want to associate the results of this tool (LOCs by language) to every build, so that custom reports can be created to see the evolution of these values (e.g. the evolution of total LOCs over time/builds).

I have seen a sample of a custom datawarehouse adapter: is that the way to go? Do I store my custom values in the IBuildDetail? How?


Absolutely, going down the road of using a custom data warehouse adapter is absolutely the method I would choose. If you want to find a TFS 2010-specific sample for a custom warehouse adapter, you can find it at the TFS SDK site.

The Visual Studio Code Metrics Power Tool that became available is one way that you can get some good information during the build process. Jakob Ehn did some work to show how to integrate the tool into a TFS 2010 build process template.The key would be how to store that particular date in a meaningful way where the data won't likely get removed (so that you can rebuild the warehouse at any time) and is portable in case the Team Project Collection database is moved to another server instance.

Ideally, what I would do is during the build process, add a build information node to the IBuildDetail object's Information collection before the build has completed with your special information. There are a lot of different standard types of build information nodes that you can use (IBuildInformation - see the extension methods for some ideas) but you can create your own custom type.

Whenever the data warehouse adapter runs later, it can search through the build information nodes for the IBuildDetail (IBuildDetail.Information)to find your special data and pump it into the custom measure that you create for the build dimension.

Let me know if you have any other questions!


The Microsoft Visual Studio ALM Rangers are considering to pick this up as a guidance project. If you find this an important item for more guidance, then please add your vote here.


I came up with the idea to store the data in TFS by creating a custom work item type holding the values in an reportable dimension. When it works you'll get a lot for free. Haven't tried it out yet though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜