-->

TFS生成测试结果(TFS Build Test Results)

2019-08-31 12:59发布

我们正在努力Visual Studio 2010和TFS 2010年。我们有自己的BuildTemplate是默认模板的副本,但像一些添加剂(创建目录...),但主要的一点,所有的都在DefaultTemplate - 离开了。

我们也正在努力威滕“单位”的测试。 我已运行所有的单元测试生成定义。 看过这里的信息- http://geekswithblogs.net/jakob/archive/2009/06/03/tfs-team-build-2010-running-unit-tests.aspx和很多其他地方也。

构建运行恰到好处,那is'nt工作的唯一事情是一个Build总结 - 测试结果,代码覆盖率喜欢在上面的链接。

所以,当我在看活动日志,同时建立我的应用程序,它表明:

Run MSTest for Test Assemblies
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe /nologo /usestderr /testSettings:"C:\Builds\7\**Project**\**BuildName**\Sources\**ProgramName**\**ProgNameAndVersion**\Solutions\**SolutionName**\localtestrunDebug.testrunconfig" /searchpathroot:"C:\Builds\7\**Project**\**BuildName**\Binaries" /resultsfileroot:"C:\Builds\7\**Project**\**BuildName**\TestResults" /testcontainer:"C:\Builds\7\**Project**\**BuildName**\Binaries\**TestProjectName**.dll" /publish:"http://***:8080/tfs/MSLN" /publishbuild:"***:///Build/Build/14599" /teamproject:"**ProjectName**" /platform:"x86" /flavor:"**Release**" 
Loading C:\Builds\7\**Project**\**BuildName**\Sources\**ProgramName**\**ProgNameAndVersion**\Solutions\**SolutionName**\localtestrunDebug.testrunconfig...
Loading C:\Builds\7\**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:\Builds\7\**Project**\**BuildName**\TestResults\***tfsbuild_***TFSBUILDER 2013-04-19 10_03_42_x86_Release.trx
Test Settings: Local Test Run

而在生成汇总的到底是空白:

1个项目/解决方案的编制没有测试结果无代码覆盖率结果

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

我在TFS首发这么帮助我通过简单的语言给意见=)

Answer 1:

你可能没有所需的权限,看看测试结果。 请检查您例如使用TFS 2010电动工具或其他工具的权限。 随着TFS电动工具,你去团队>团队项目设置>安全检查查看测试运行在你的组权限。



Answer 2:

您也可以将您的带有.trx文件复制到工作区。



文章来源: TFS Build Test Results