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

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

问题描述

我们正在研究Visual Studio 2010和TFS2010。我们有自己的BuildTemplate,它是默认模板的副本,但有一些附加内容,例如(create Directory ...),但要点是,所有这些都是

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.

我们见证了单元测试的成功。我已经建立了运行所有单元测试的构建定义。已在此处阅读信息- 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.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

在构建摘要末尾为空白:

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天全站免登陆