如何通知TFS构建统计信息?

时间:2022-09-11 16:35:10

I am told TFS can accept data on build/test metrics from 3rd party continuous integration tools. Does anyone know how this works or have any good links for me? My google-fu seems weak today and I cannot find any info on this. We would like to have a short powershell script or app run at the end of the build and send all known metrics up to TFS so it could show up in certain reports. I actually would like things that (I think) should already have space for in the data warehouse for TFS BUild Server, but I will be using CC.NET. I am thinking build name, result (Pass/Fail), Number of Warnings, Number of Errors, Time, UnitTests Run, UnitTests Passed, Code Coverage, FxCop resultsThanks.

我被告知TFS可以接受来自第三方持续集成工具的构建/测试指标数据。有谁知道这是如何工作或有任何好的链接给我?我的谷歌今天似乎很弱,我找不到任何关于此的信息。我们希望在构建结束时运行一个简短的PowerShell脚本或应用程序,并将所有已知的指标发送到TFS,以便它可以显示在某些报告中。我实际上想要的东西(我认为)应该已经在TFS BUild Server的数据仓库中有空间,但我将使用CC.NET。我在想构建名称,结果(通过/失败),警告数,错误数,时间,单元测试运行,单元测试通过,代码覆盖率,FxCop resultsThanks。

1 个解决方案

#1


I'm afraid that there is not a ready made integration that does this yet. The plug-in that links CC.NET to TFS is available over at CodePlex but this just lets CC.NET use TFS for version control and doesn't allow the results of the builds to be published back into TFS.

我担心还没有现成的集成来做到这一点。可以通过CodePlex获得将CC.NET链接到TFS的插件,但这只是让CC.NET使用TFS进行版本控制,并且不允许将构建结果发布回TFS。

To get the data into TFS from CruiseControl.NET you have a couple of options. You could write your own custom TFS Data Warehouse Adapter which is complex but ultimately flexible or you could use a combination of the Team Build API and a little bit of vodoo to push data in to the TFS Build store that would also get pushed into the TFS Data warehouse. However, this would be limited in TFS2008 as you would only be able to push data about the build and the unit tests but not things like Code Coverage.

要从CruiseControl.NET将数据导入TFS,您有几个选择。你可以编写自己的自定义TFS数据仓库适配器,它很复杂但最终很灵活,或者你可以使用Team Build API和一点点vodoo的组合将数据推送到TFS Build商店,这也将被推入TFS数据仓库。但是,这在TFS2008中是有限的,因为您只能推送有关构建和单元测试的数据,但不能推送代码覆盖率等数据。

That said, pushing data from CC.NET to TFS is something that I originally wanted to do. However in TFS2008 the built in build system was so good that I switched from using CC.NET to trigger the builds to using TFS to trigger and manage the build. This had the advantage that all the stats stuff was taken care of automatically (and the built in UI in Visual Studio). Because I moved to TFS2008 I then lost the motivation to get the CC.NET stuff built.

也就是说,将数据从CC.NET推送到TFS是我原本想要做的事情。但是在TFS2008中,内置的构建系统非常好,我从使用CC.NET切换到触发构建到使用TFS来触发和管理构建。这样做的好处是所有的统计信息都是自动处理的(以及Visual Studio中的内置UI)。因为我搬到了TFS2008,所以我失去了构建CC.NET的动力。

If anyone wanted to contribute a TFS build result publishing feature to the CC.NET integration then feel free to join the project on CodePlex - I would love to have any help going.

如果有人想为CC.NET集成贡献TFS构建结果发布功能,那么随意加入CodePlex上的项目 - 我很乐意得到任何帮助。

#1


I'm afraid that there is not a ready made integration that does this yet. The plug-in that links CC.NET to TFS is available over at CodePlex but this just lets CC.NET use TFS for version control and doesn't allow the results of the builds to be published back into TFS.

我担心还没有现成的集成来做到这一点。可以通过CodePlex获得将CC.NET链接到TFS的插件,但这只是让CC.NET使用TFS进行版本控制,并且不允许将构建结果发布回TFS。

To get the data into TFS from CruiseControl.NET you have a couple of options. You could write your own custom TFS Data Warehouse Adapter which is complex but ultimately flexible or you could use a combination of the Team Build API and a little bit of vodoo to push data in to the TFS Build store that would also get pushed into the TFS Data warehouse. However, this would be limited in TFS2008 as you would only be able to push data about the build and the unit tests but not things like Code Coverage.

要从CruiseControl.NET将数据导入TFS,您有几个选择。你可以编写自己的自定义TFS数据仓库适配器,它很复杂但最终很灵活,或者你可以使用Team Build API和一点点vodoo的组合将数据推送到TFS Build商店,这也将被推入TFS数据仓库。但是,这在TFS2008中是有限的,因为您只能推送有关构建和单元测试的数据,但不能推送代码覆盖率等数据。

That said, pushing data from CC.NET to TFS is something that I originally wanted to do. However in TFS2008 the built in build system was so good that I switched from using CC.NET to trigger the builds to using TFS to trigger and manage the build. This had the advantage that all the stats stuff was taken care of automatically (and the built in UI in Visual Studio). Because I moved to TFS2008 I then lost the motivation to get the CC.NET stuff built.

也就是说,将数据从CC.NET推送到TFS是我原本想要做的事情。但是在TFS2008中,内置的构建系统非常好,我从使用CC.NET切换到触发构建到使用TFS来触发和管理构建。这样做的好处是所有的统计信息都是自动处理的(以及Visual Studio中的内置UI)。因为我搬到了TFS2008,所以我失去了构建CC.NET的动力。

If anyone wanted to contribute a TFS build result publishing feature to the CC.NET integration then feel free to join the project on CodePlex - I would love to have any help going.

如果有人想为CC.NET集成贡献TFS构建结果发布功能,那么随意加入CodePlex上的项目 - 我很乐意得到任何帮助。