Why support more? The story of MSTest…

Frustration by MarkKelley.With the new Visual Studio comes another version of Microsoft’s unit testing framework. This is Microsoft’s take on how unit testing should be done and they got a few things right – as always it’s fully integrated with Visual Studio, and with the new version comes a two exciting new features:

  1. Run tests as 64 bit process – at last I’m able to test that my code works in x64 as well
  2. Parallel execution – run your test suite in half/quarter of the time!

Yet given a choice I still prefer to work with NUnit, and I have a few good reasons – the last strew was Microsoft’s decision not to support multi targeting of the test framework.

What does it means

Not supporting multi-targeting means that once you’ve used VS2010 to run your tests they would automatically be converted to .NET 4 which means that you won’t be able to run them using older versions of Visual Studio – want to read more have a look at this bug report turned feature.

In one of the projects I work on we need to be able to run the same test suite on VS2008 and VS2010 – but we just can’t, we need to maintain two projects just to be able to run the same tests.

So what?

Although this is not such a big deal it seems to me that similar decisions can be found on every step MSTest has done on the road. For example ExpectedException not being able to verify exception message – by design, but still have a message property used for “informative purposes”. Why put a property I’m used to from other frameworks and change the way it work - that’s just confusing. And not to mention the fact that from time to time I get an bonus – instead of running just the test in a specific context all of my tests are run.

Don’t get me wrong I still use MSTest and it’s still my 2nd favorite .NET unit testing framework but sometimes it’s just frustrating to use.

I hope Microsoft will start listening to their costumers before making decisions that make us work harder than we really need to.

Labels: ,