简体   繁体   English

如何将Cake版本的输出集成到TFS 2013版本中?

[英]How can I integrate output from a Cake build into a TFS 2013 build?

We're using cake for defining our .NET builds, primarily so we can run the same build on developer stations as on the build server. 我们使用cake来定义.NET构建,主要是因为我们可以在开发人员工作站上与构建服务器上运行相同的构建。 TFS 2013 is our actual CI platform; TFS 2013是我们实际的CI平台; the build workflow is effectively just a RunScript activity which invokes powershell and runs cake via its build.ps1 script. 构建工作流程实际上只是一个RunScript活动,该活动调用powershell并通过其build.ps1脚本运行cake。

The basic build is working well enough, and I'm on to having it generate reports (unit test results, coverage reports, etc). 基本版本运行良好,我将继续生成报告(单元测试结果,覆盖率报告等)。 I'd like to have these reports appear in the build's Summary screen, but at the moment the only feedback the build gives me is the console output from cake under the build logs. 我希望这些报告出现在构建的“摘要”屏幕中,但是目前,构建给我的唯一反馈是构建日志下cake的控制台输出。 The report files are being generated and dropped into the build's ./tst/ folder, but the contents of that folder aren't appearing anywhere in the build information. 正在生成报告文件并将其放到构建的./tst/文件夹中,但是该文件夹的内容没有出现在构建信息中的任何位置。

How can I get test reports to be added to the build summary and/or information pages? 如何获得要添加到构建摘要和/或信息页面的测试报告?

With the default build process template, when you build a test project, you will be able to get test result and code coverage (if you enable it) by default. 使用默认的构建过程模板,在构建测试项目时,默认情况下将能够获得测试结果和代码覆盖率(如果启用)。 So if you use VS Test Runner to run the tests, you can refer to the default process template. 因此,如果使用VS Test Runner运行测试,则可以引用默认的流程模板。

If you need other tool to run the teats, you can add the InvokeProcess activity (execute the command line) to invoke the tool to test your project in build process template. 如果您需要其他工具来运行该奶头,则可以添加InvokeProcess activity (执行命令行)以调用该工具以在构建过程模板中测试您的项目。

In addition, you can use the WriteCustomSummaryInformation activity in your workflow. 此外,您可以在工作流程中使用WriteCustomSummaryInformation activity The result is that you can display results, hyperlinks, and more on the build summary page. 结果是您可以在构建摘要页面上显示结果,超链接等。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM