我们正在努力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首发这么帮助我通过简单的语言给意见=)