没有VS,如何在持续集成中使用MsTest?

发布于 2024-07-23 10:17:50 字数 220 浏览 3 评论 0 原文

我的问题很简单,我有一个运行 msbuild 和 mstest 的 CI 服务器。

问题是,如果我们不在服务器中安装 VS,则 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 不存在(并且我认为与 mstest 相关的其他文件...)对于 CI 服务器来说相当愚蠢......

我该如何解决这个问题?

My problem is quite simple, I have a CI server which runs msbuild and mstest.

The problem is that the Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll doesn't exist (and I thinks other files related to mstest...) if we don't install VS in the server which is pretty stupid for a CI server...

How can I fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一场春暖 2024-07-30 10:17:50

不幸的是,没有受支持或简单的方法来解决必须在 2005 年或 2008 年在构建代理计算机上安装 VS (2010 年将有一个测试代理安装程序)。 更新: 查看此帖子Steve Smith 提供了更多信息,其中说了几乎相同的事情

这不仅仅是缺少程序集的问题 - 如果您想运行测试,运行程序不仅仅是一个单独的小 EXE 和 DLL。

是的,很难相信! 不用说,地球上很少有其他测试框架有这个限制,所以除非你有很多测试,否则你可以考虑移动,原因有很多,例如: 使用 MSTest 的基本问题和不切实际...

编辑:根据 Rihan 的回复提示,我狂吃以下 运行 mstest没有 Visual Studio。 - 它不完全支持,但它“有效”...

编辑 2: 在没有 Visual Studio 的情况下运行 MSTest - Gallio 来救援 在支持和非支持方面看起来更有希望-哈基。 请注意,请参阅@Johannes Rudolph 对这篇文章的评论“

编辑 3:添加了有关此问题的 2010 年状态的信息”

注意:我在 2008 年有一个类似的问题,涉及支持 MSTest 的 /publish 参数所需的内容:- 在 TeamBuild 服务器上运行 MSTEST.exe /publish,有哪些先决条件?

Unfortunately, there is no supported or easy way around having to install VS on the build agent machine in 2005 or 2008 (There will be a test agent installer in 2010). UPDATE: See this post from Steve Smith for more info which says pretty much the same thing

It's not just a matter of the assemblies being missing - if you want to run the tests, the runner is not just a separate little EXE and a DLL.

Yes, hard to believe! Needless to say, very few other test frameworks on the planet have this restriction, so unless you have a lot of tests, you could consider moving, for a variety of reasons which are covered in many places, example: The fundamental problems and impracticality of using MSTest...

EDIT: Prompted by Rihan's reply, I binged up the following Running mstest without Visual Studio. - It's not fully supported, but it 'works'...

EDIT 2: Running MSTest without Visual Studio - Gallio to the rescue looks a lot more promising in terms of being supported and non-hacky. NB see @Johannes Rudolph's comment on this post tho'

EDIT 3: Added info re 2010 status on this question

NOTE: I have a similar question for 2008 regarding what's required to support the /publish parameter of MSTest:- Running MSTEST.exe /publish on a TeamBuild server, what are the prerequisites?

妞丶爷亲个 2024-07-30 10:17:50

@Ruben Bartelink:您可以通过安装测试代理在您的计算机中获取 mstest.exe。 你可以在@给定位置找到它。 安装后,使用 /testcontainer 和 /test 选项调用 mstest.exe。 它成功运行并创建 trx 文件。 检查是否有可以处理 trx 并生成报告的东西。

http://www.microsoft.com/en-us/download /details.aspx?id=38186

@Ruben Bartelink : You can get mstest.exe in your machine by installing test agents. you can find it @given location. Post installation, invoke mstest.exe with /testcontainer and /test options. It runs successfully and creates trx files. Check for something which can process trx and generate reports.

http://www.microsoft.com/en-us/download/details.aspx?id=38186

不离久伴 2024-07-30 10:17:50

我和 Visual Studio 2010 的具体解决方案是:

  1. Visual Studio Agents 2010
  2. 重新启动 Windows
  3. 安装 Visual Studio 2010 Service Pack 1
  4. 重新启动 Windows
  5. 确保项目引用已更新为指向“Microsoft.VisualStudio.QualityTools.UnitTestFramework”“10.1.0.0”而不是“10.0.0.0”。

The specific solution for me and a Visual Studio 2010 was:

  1. Install "Test Agent 2010" from Visual Studio Agents 2010
  2. Restart Windows
  3. Install Visual Studio 2010 Service Pack 1
  4. Restart Windows
  5. Ensure the projects References are updated to point at "Microsoft.VisualStudio.QualityTools.UnitTestFramework" "10.1.0.0" and not "10.0.0.0".
笑,眼淚并存 2024-07-30 10:17:50

我们的集成服务器上有巡航控制设置。 我尚未安装 Visual Studio,但我已将 MSTEST 程序集复制到 GAC 中。 然后,我们使用 Cruise Control 文档 进行设置我们的测试报告。 效果很好。

We have Cruise Control setup on our integration server. I have not installed visual studio, however I have copyied the MSTEST assemblies into the GAC. We then used Cruise Control Documentation to setup our test reports. Works very well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文