Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool



Clean build server with MSTest == FAIL

It is no secret that I am not a fan of MSTest (read here for more rants on MSTests).  Today's rant is about how MSTest does not allow you to have a clean build server.

Yea I know what you are thinking, here comes another long winded rant on MSTest.  Well this should not be too long winded, and hey, it is my blog and I can rant if I want to :).

This week I was trying to setup our build server and I need it to run MSTest tests.  I know that MSTest does not run like NUnit, but thought for sure there was a way I could get my tests to run without having to install the full blown version of Visual Studio.  After a bit of searching and asking others I came to final conclusion that in fact you cannot get MSTest to run without Visual Studio. 

This is an issue to me because when I setup my build server I like to keep it clean.  I do NOT want to install any 3rd party software.  The way I see it is like this.  If we are not going to install the software package on the end users computer, why should I need to install them on our build server, and the last time I checked we do not install Visual Studio on our end users computer.

This is another issue to me because MSTest is the ONLY test framework (for .Net) that I know of that does not run with a single DLL placed into the bin (or any other output directory).  I just have to ask the genius' over in Redmond what the hell were they smoking when they decided to build MSTest.  It is pretty clear they had no prior knowledge of how to use the other tools such as NUnit, MBUnit or xUnit (I know, xUnit was not out yet).  I know this because of all the various testing frameworks MSTest is the one that does everything different.  You could argue they were on the cutting edge and were innovating, but I call BS on that.

Anyway, I feel better now telling the world another reason why I am not a fan of MSTest.  Sadly I am stuck using it for now and at least in the short term as we have hundred of tests already written in MSTest.  But rest assured that I am on a crusade to get our team to switch from MSTest to NUnit (or any other logical framework).

Till next time,

[----- Remember to check out DimeCasts.Net -----]


Published Sep 25 2008, 05:10 AM by Derik Whittaker
Filed under: ,

Comments

redsolo said:

I hear your pain (redsolo.blogspot.com/.../frustration-grows-when-unit-testing.html). On my previous job I actually used both NUnit and MSTest to test our apps, I was able to annotate the test methods/classes with annotations from both frameworks. Thereby I could run the tests on the CI server using NUnit and in the IDE.

But I think NUnit had a MSTest compability a long time ago, perhaps that could be looked into again?

# September 25, 2008 2:51 PM

Dave Schinkel said:

I personally do love NUnit and TestDriven.NET.  Haven't used MSTest but I'm not surprised.  If Microsoft can't build a decent build server in the first place (TFS) as opposed to a good build / source control software such as Subversion, why would I think the fancy UI in MSTest would be any better.  The only good development tool MS has build for developers is Visual Studio and lets leave it at that.

But at the same token, I don't see a problem with installing VS on your test server.  Sure yes, while the famous "keep it clean" phrase makes sense, I'm not that anal about just putting an instance of VS on my server.

# September 28, 2008 2:55 PM

Jeremy Wiebe said:

We're using MSTest at work and I feel your pain.  I wonder if the reason why MSTest lags behind the other unit tests suites is because Microsoft wasn't really targetting TDD folks when they build it, but rather the corporate developer who wants to check of the box that says "I unit tested my code".  I cringe ever time I see unit tests that have been created using the "Generate unit tests" feature in Visual Studio (TestFriends.vb or .cs is evil :-) )

On the topic if build servers one similar issue that drives me nuts is 3rd party control suites that insist that you have installed the full suite on the build server for you to build any software that uses their suite.  (as opposed to just dropping the control dll's in a /lib directory in the source tree).  

# October 1, 2008 7:49 PM

Joshua Flanagan said:

I don't remember the specifics, but I'm pretty sure I looked into this in the past and was able to make it work. You don't necessarily need to install VS - you just need to copy files from the right directories. Look under Program Files\MSBuild\Microsoft on a machine with VS installed. I think the MSBuild task DLL and targets files are in there. Copy them into your bin folder, and then update your MSBuild script to reference them appropriately.

# October 13, 2008 3:00 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Derik Whittaker

Derik is a .Net Developer/Architect specializing in WinForms working out the northern suburbs of Chicago. He is also believer and advocate for Agile development including SCRUM, TDD, CI, etc.

When Derik is not writing code he can be found spending time with his wife and young son, climbing on his bouldering wall, watching sports (mostly baseball), and generally vegging out. Check out Devlicio.us!

Our Sponsors

Proudly Partnered With


This Blog

Syndication

News