views:

956

answers:

2

I my problem is quite simple, i have a CI server wich run msbuild and mstest.

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

Anybody have a solution about this problem ?

+5  A: 

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

EDIT 3: Added info re 2010 status on this question

NOTE: I have a similar question for 2008 regarding what's requried to support the /publish parameter of mstest:- http://stackoverflow.com/questions/1062994/running-mstest-exe-publish-on-a-teambuild-server-what-are-the-prerequisites

Ruben Bartelink
I know that mstest sucks but it's integrated to VS, and my client don't want an other things like nunit... I try to test the Rihan's way for the moment... Best regards Loïc
LoKtO
Fair enough. I do understand. Other good approaches are TestDriven.NET, the Gallio GUI runner, The NUnit GUI (you can get it to auto-run on compile which works really well - it means all you need to do is hit Shift-F6 and whatever set of tests you want (based on categories or namespace tree, or multi-selecting via checkboxes) are instantly re-run. The other thing is to consider routing them to NUnit (easier sell to an MSTEST minded shop than xUnit.NET even if I'd generally default to that) and then using Resharper or TestDriven.NET to deliver a superior experience to VS integrated testing.
Ruben Bartelink
LoKtO
I think legality is fine -- there is a link from one of the posts I cited to a comment from Jeff Beehler from MS. The installation is the more difficult bit - there isnt a checkbox on an installer anyway. I personally use RedGreen (a DXCore plugin) to run tests but its not perfect. You've definitely got work to do if integration of the test runner into the IDE is a dealbreaker for getting started on running unit tests, but I've been in your shoes and it's tricky and needs to be whatever convinces people...
Ruben Bartelink
A: 

Hi

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.

Best Regards Rihan

Rihan Meij
How did MSTEST.EXE get onto the machine? Is there somewhere that details the steps involved in doing that part (and the qhich QT dlls need to go into the GAC). Obviously if this works, it's great...
Ruben Bartelink
It is a shared development enviroment, and another person got the MSTests to run, not sure what they did to get it going. What also helps is that in your source code checkout we have a resources folder that contains handy little tools like the mstest.exe and tinyget.exe that helps in just doing a http get after our build to check the site works. Makes the checkout bigger but that has not being any issue at this point. Always looking for better simpler ways to do automation.
Rihan Meij
I'd venture that some of the stuff as covered in the links I added to in my response is what happened... I'd be recommending using something like Gallio, or switching to NUnit or xUnit.NET - especially if you're the type of shop that has chosen CC.NET vs TeamCity or VSTS
Ruben Bartelink