在 TeamBuild 服务器上运行 MSTEST.exe/publish,先决条件是什么? [英] Running MSTEST.exe /publish on a TeamBuild server, what are the prerequisites?

查看:18
本文介绍了在 TeamBuild 服务器上运行 MSTEST.exe/publish,先决条件是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类似于如何在没有VS的情况下在持续集成中使用MsTest?,我想在 TeamBuild 服务器上运行 mstest.exe.

Similarly to How to use MsTest in Continuous Integration without VS?, I want to run mstest.exe on a TeamBuild server.

我的上下文是 在 MSBuild 中捕获错误状态 - 即,我只是尝试使用 mstest.exe/publish 将结果上传到 TFS 存储库.因此 http://www.shunra.com/shunrablog/index.php/2009/04/23/running-mstest-without-visual-studio/ 是(你希望)可能是矫枉过正,尤其是MSTEST.exe,如 http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/thread/e4575890-8f88-413c-a7f3-0d09d3b9cb01 建议我需要做的就是安装团队资源管理器.

My context is Trapping Error Status in MSBuild - i.e., I'm only trying to use mstest.exe /publish to upload the results in to the TFS repository. Thus the full rigmarole in http://www.shunra.com/shunrablog/index.php/2009/04/23/running-mstest-without-visual-studio/ is (you'd hope) likely to be overkill, esp as MSTEST.exe, as covered in http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/thread/e4575890-8f88-413c-a7f3-0d09d3b9cb01 suggests all I need to do is install Team Explorer.

我已经安装了 VS2008 Team Explorer SP1 和 mstest.exe/?仍然没有告诉我发布选项.

I've installed VS2008 Team Explorer SP1, and mstest.exe /? still isnt telling me about the publish options.

回想一下,它说 mstest.exe/? 只需要 Team Explorer用于发布:

Recall that it says only Team Explorer is required of mstest.exe /? for publishing:

如果安装了 Team Explorer,以下选项也可用:

The following options are also available if Team Explorer is installed:

/publish:[服务器名称] 将结果发布到 Team Foundation服务器.

/publish:[server name] Publish results to the Team Foundation Server.

/publishbuild:[构建名称] 用于发布的构建标识符测试结果.

/publishbuild:[build name] The build identifier to be used to publish test results.

/publishresultsfile:[file name] 测试结果文件的名称发布.如果没有指定,则使用当前测试运行生成的文件.

/publishresultsfile:[file name] The name of the test results file to publish. If none is specified, use the file produced by the current test run.

/teamproject:[团队项目名称] 团队项目的名称构建属于.发布时指定此项测试结果.

/teamproject:[team project name] The name of the team project to which the build belongs. Specify this when publishing test results.

/platform:[platform] 构建所针对的平台发布测试结果.

/platform:[platform] The platform of the build against which to publish test results.

/flavor:[flavor] 构建的风味发布测试结果.

/flavor:[flavor] The flavor of the build against which to publish test results.

我将沿着 procmon.exe 路径找出缺少的内容,但理想情况下,知情人士会介入并回答:-

I'm going down the procmon.exe path to figure out what's missing, but ideally someone in the know would step in and answer:-

mstest.exe/publish 应该只需要团队资源管理器,还是需要 VSTT 和团队资源管理器?

Should mstest.exe /publish only require Team Explorer as stated, or does it require VSTT and Team Explorer?

推荐答案

MSTest.exe 的/publish 选项进行许可证检查以确保安装了 Visual Studio 的团队"版本(即开发人员或测试版本)在它执行代码的发布部分之前.

The /publish option of MSTest.exe does a license check to ensure that a "Team" version of Visual Studio is installed (i.e. the Developer or Test edition) before it does the publish part of the code.

此限制似乎已被引入以允许 Visual Studio 标准版本中的基本单元测试功能,但要求您拥有更昂贵的 Visual Studio 团队版本之一,以在测试中启用团队"相关功能 - 例如以将您的测试结果发布到 TFS.

This restriction appears to have been introduced to allow the basic unit testing capabilities in standard versions of Visual Studio but requires you to have one of the more expensive Team editions of Visual Studio to enable the "Team" related features in testing - such as to publish your test results to TFS.

如果您没有安装 Team Epxlorer 的 Visual Studio 团队版,总共有 3 个缺失的功能.

In total there are 3 missing features if you do not have a Team edition of Visual Studio with Team Epxlorer installed.

  • 发布到 TFS
  • 代码覆盖率
  • 连接到远程代理.

如果您安装了开发版,那么您将获得发布和代码覆盖率,但不会获得远程代理代理功能(即用于进行负载测试).

If you have the Development Edition installed then you get publish and codecoverage but not the remote agent agent capabilities (i.e. for doing Load lesting).

测试版和 Visual Studio Team Suite 应有尽有.

The Test Edition and Visual Studio Team Suite have everything.

如果您想查看使用 MSTest.exe 从构建服务器发布单元测试数据的自定义 MSBuild 任务示例(在本示例中为 JUnit 测试数据),请查看 Teamprise Build Extensions 我写的.这些源代码可在许可的 MS-PL 开放源许可证.

If you would like to see an example of a custom MSBuild task that uses MSTest.exe to publish unit test data from a build server (in this example JUnit test data), then take a look at the Teamprise Build Extensions that I wrote. The source code for these is available under the permissive MS-PL open source license.

这篇关于在 TeamBuild 服务器上运行 MSTEST.exe/publish,先决条件是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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