views:

251

answers:

3

I have chosen these two as primary candidates. My thinking goes like this:

  • MbUnit has had a nice start and enjoys a smart, dedicated team of developers.
  • MSFT has many resources and can compete with MbUnit easily if they choose to do so.

Which one do you believe I should bet on?

+1  A: 

Microsoft unit testing framework is kind of tied to Visual Studio. This is both an advantage and disadvantage. Advantage is you can run tests easily from Visual Studio out of the box, disadvantage is forget about Mono support. It's worth noting that VS2010 will support 3rd party unit test frameworks.

joemoe
VS 2008 already supports 3rd party unit test frameworks to a degree. Gallio provides Visual Studio integration for MbUnit, NUnit, xUnit.net and others...
Jeff Brown
+3  A: 

I love MbUnit because it supports parametrized tests through attributes. So you can do something like this:

[Test]
[Row(2,1,2)]
[Row(4,3,1)]
[Row(ExpectedException(typeof(DivideByZeroException)))]
void TestIntDivision(int numerator, int denominator, int result)
{
  Assert.AreEqual(result, numerator/denominator);
}
Igor Zevaka
I like! Whatever happened to their servers though?
Hamish Grubijan
It's fixed. Just a power outage and a misbehaving VM.
Jeff Brown
NUnit now has the same thing with their TestCase attribute in version 2.5.
Daniel Schilling
+1  A: 

NUnit is more widespread, MbUnit has the most features, but MSTest has more manpower behind it. Check this question out: http://stackoverflow.com/questions/261139/nunit-vs-mbunit-vs-mstest-vs-xunit-net

Dragan Chupacabrovic