本文是小编为大家收集整理的关于如何在没有VS的情况下在持续集成中使用MsTest?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。
问题描述
我的问题很简单,我有一个运行msbuild和mstest的CI服务器.
问题是Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll不存在(我认为与MSTest相关的其他文件)如果我们不在服务器中安装VS,这对于CI服务器来说很愚蠢...
我该如何修复?
推荐答案
不幸的是,没有支持或简单的方法必须在2005年或2008年在构建代理机上安装VS(在2010年将有一个测试代理安装程序).更新:请参阅此帖子史蒂夫·史密斯(Steve Smith)获取更多信息,其中几乎是同一件事
,这不仅仅是丢失组件的问题 - 如果您想运行测试,跑步者不仅是单独的小exe和dll.
是的,很难相信!不用说,地球上很少有其他测试框架具有此限制,因此,除非您有很多测试,否则您可以考虑移动,因为许多地方涵盖了许多地方,例如:使用mstest的基本问题和不切实际性 ...
编辑:在蕾哈(Rihan)的答复中提示,我提出了以下在没有视觉工作室的情况下运行mstest. - 它没有完全支持,但它'起作用'...
编辑2:在没有视觉工作室的情况下运行mstest -Gallio进行救援在受到支持和无害方面,看起来更有前途. NB请参阅@Johannes Rudolph对此文章的评论'
编辑3:添加了此问题的2010年状态
注意:我在2008年有一个类似的问题,即支持mstest的/发布参数所需的内容: - 其他推荐答案 @Ruben Bartelink:您可以通过安装测试剂在计算机中获取mstest.exe.您可以找到它@given位置.后安装,使用/testContainer和/测试选项调用mstest.exe.它成功运行并创建TRX文件.检查可以处理TRX并生成报告的内容. http://www.microsoft us/download/lidets.aspx?id = 38186 我和Visual Studio 2010的特定解决方案是:其他推荐答案
问题描述
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?
推荐答案
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?
其他推荐答案
@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
其他推荐答案
The specific solution for me and a Visual Studio 2010 was:
- Install "Test Agent 2010" from Visual Studio Agents 2010
- Restart Windows
- Install Visual Studio 2010 Service Pack 1
- Restart Windows
- Ensure the projects References are updated to point at "Microsoft.VisualStudio.QualityTools.UnitTestFramework" "10.1.0.0" and not "10.0.0.0".