How to use MsTest in Continuous Integration without VS?

前端 未结 4 1009
你的背包
你的背包 2021-01-11 10:23

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<

相关标签:
4条回答
  • 2021-01-11 10:53

    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".
    0 讨论(0)
  • 2021-01-11 10:58

    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?

    0 讨论(0)
  • 2021-01-11 11:08

    @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

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题