TFS 构建测试结果 [英] TFS Build Test Results

查看:14
本文介绍了TFS 构建测试结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发 Visual Studio 2010 和 TFS 2010.我们有自己的 BuildTemplate,它是默认模板的副本,但添加了一些内容,例如(创建目录...),但重点是,所有这些都是在 DefaultTemplate 中 - 已离开.

We're working on Visual Studio 2010 and TFS 2010. We have our own BuildTemplate that is a copy of default template, but with some additions like (create Directory...), but the main point, that all that is in DefaultTemplate - is left.

我们的单元"测试也有效.我已经创建了运行所有单元测试的 Build 定义.已阅读此处的信息 - http://geekswithblogs.net/jakob/archive/2009/06/03/tfs-team-build-2010-running-unit-tests.aspx 以及许多其他地方.

We have witten "unit" tests that also are working. I have made Build definition that runs all the unit tests. Have read the information here - http://geekswithblogs.net/jakob/archive/2009/06/03/tfs-team-build-2010-running-unit-tests.aspx and a lot of other places also.

构建运行得非常完美,唯一不起作用的是构建摘要 - 测试结果、代码覆盖率,如上面的链接所示.

Build runs just perfect, the only thing that is'nt working is a Build summary - Test results, Code coverage like in the link above.

因此,当我在构建应用程序时查看活动日志时,它表明:

So when i'm watching Activity log while building my application, it shows that:

Run MSTest for Test Assemblies
c:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEMSTest.exe /nologo /usestderr /testSettings:"C:Builds7**Project****BuildName**Sources**ProgramName****ProgNameAndVersion**Solutions**SolutionName**localtestrunDebug.testrunconfig" /searchpathroot:"C:Builds7**Project****BuildName**Binaries" /resultsfileroot:"C:Builds7**Project****BuildName**TestResults" /testcontainer:"C:Builds7**Project****BuildName**Binaries**TestProjectName**.dll" /publish:"http://***:8080/tfs/MSLN" /publishbuild:"***:///Build/Build/14599" /teamproject:"**ProjectName**" /platform:"x86" /flavor:"**Release**" 
Loading C:Builds7**Project****BuildName**Sources**ProgramName****ProgNameAndVersion**Solutions**SolutionName**localtestrunDebug.testrunconfig...
Loading C:Builds7**Project****BuildName**Binaries**TestProjectName**.dll...
Starting execution...

Results               Top Level Tests
-------               ---------------
Failed                ***.Test.***
Failed                ***.Test.***
Failed                ***.Test.***
Passed                ***.Test.***
Passed                ***.Test.***
Inconclusive          ***.Test.***
Inconclusive          ***.Test.***
Passed                ***.Test.***
<many other tests>
...
5/154 test(s) Passed, 147 Failed, 2 Inconclusive

Summary
-------
Test Run Failed.
Failed        147
Passed          5
Inconclusive    2
-----------------
Total         154
Results file:  C:Builds7**Project****BuildName**TestResults***tfsbuild_***TFSBUILDER 2013-04-19 10_03_42_x86_Release.trx
Test Settings: Local Test Run

并且在构建摘要的末尾是空白的:

And at the end of the Build summary is blank:

已编译 1 个项目/解决方案无测试结果无代码覆盖结果

1 projects/solutions compiled No Test Results No Code Coverage Results

为什么它不像链接中那样显示测试结果: http://geekswithblogs.net/jakob/archive/2009/06/03/tfs-team-build-2010-running-unit-tests.aspx

我是 TFS 的初学者,所以通过用简单的语言提供建议来帮助我解决这个问题 =)

I'm a starter in TFS so help me with this by giving advices in simple language =)

此链接似乎已移至(2019-09-23 编辑):https://blog.ehn.nu/2009/06/tfs-team-build-2010-executing-unit-tests/

This link seems to have moved to (edited 2019-09-23): https://blog.ehn.nu/2009/06/tfs-team-build-2010-executing-unit-tests/

推荐答案

您可能没有查看测试结果所需的权限.请检查您的权限,例如使用 TFS 2010 Power Tools 或其他一些工具.使用 TFS Power Tool,您可以转到团队">团队项目设置">安全性"并检查您所在组的查看测试运行权限.

You probably don't have required permissions to see test results. Please check you permissions for example with TFS 2010 Power Tools or some other tool. With TFS Power Tool you go to Team > Team Project Settings > Security and check View test runs permission on the group that you are in.

这篇关于TFS 构建测试结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆