tags:

views:

284

answers:

3

I understand that the "NUnit vs. MSTest" question has been asked alot on SO. However, I have a simple question that I think hasn't been answered directly.

I am new to TDD, and I know that both have their pro's and con's, however I want to know from a simplicity point of view which would be easier, MSTest or NUnit?

I have no preconceived favorites, I just want to know if there are things that one has that the other does not that are large differences.

+4  A: 

From the simplicity perspective MSTest has a clear bonus in terms of IDE Integration. No download, no install, no configuration just start unit testing. It's perfect to get your feet wet. I'd switch to NUnit (or personally MbUnit) later on.

For the basics (which you will definately start with) both frameworks have equal capabilities. When switching to any other framework you will notice some things are named differently, however the concepts remain the same. It's like switching from Java to C#.

Johannes Rudolph
So if I'm just starting, I shouldn't even start with MSTest if I'm planning on continuing down the TDD path?
WedTM
No, you _should_ start with MSTest, but don't stick with it if you see others fit your bill better.
Johannes Rudolph
I think his point is just, that if he is going to want to switch to nUnit or mbUnit later because they are better test frameworks, then he isn't really saving himself any time by starting with MSTest first in the long run.
Chris Nicola
Migrating the basics is easy (replace attribute names etc.). I think that's what he'll start with anyway. Maybe he realizes that TDD does not work for him or wants to drop it for whatever reason. "Built one to throw away" is what I'd do here.
Johannes Rudolph
+2  A: 

There's a nice comparison of unit testing frameworks. My personal advice would be to go with MSTest only if you use Microsoft Team Foundation Server for continuous integration, otherwise stick with open source alternatives.

Darin Dimitrov
+1  A: 

I've actually never used MSTest myself since I started learning TDD with nUnit right away. One of the reasons I did not try out MSTest first was that I heard mostly negative opinions whenever I mentioned it to most TDD'ers. Again, I have no personal experience with it, I can only say I find nUnit easy to use.

There are also quite a few other options out there like xUnit and MBUnit which people also enjoy using and I have heard many good things about them. For my part I can say nUnit is a very full featured test framework and it works well for me.

If IDE integration is important, then I would suggest you get ReSharper which provides excellent IDE integration for nUnit and it also has support for most popular test frameworks, either natively or via plugins. Besides, everyone should be using ReSharper anyways, right? ;-).

Chris Nicola