4

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?

Welbog
  • 59,154
  • 9
  • 110
  • 123
Hamish Grubijan
  • 10,562
  • 23
  • 99
  • 147
  • Well MbUnit.com is down, so I'd say thats your answer. – Yuriy Faktorovich Jan 08 '10 at 03:35
  • That is because they have migrated to another domain, Tovarisch. – Hamish Grubijan Jan 08 '10 at 03:37
  • Personally I've gone with MSFT in combination with MOQ, no complaints so far. – Yuriy Faktorovich Jan 08 '10 at 03:38
  • 2
    What domain? I went to their google site and both of the links on the site are broken. – Yuriy Faktorovich Jan 08 '10 at 03:39
  • Do some research on how easy it is to migrate from your choice to the prevalent unit testing frameworks.. if it is easy it means your current decision is reversible. Hence it doesn't matter if you make the wrong choice now.. so choose it and move on. IMHO I've found unit testing adequate, when someone comes up to me saying that NUnit (or any simple UT fwk) is missing some feature, usually the problem is the way in which they've designed the test in their heads. You can restructure to a simpler way & you find NUnit can in fact do it. – Gishu Jan 08 '10 at 04:21
  • 2
    what is with the backwards text? Bad form. Especially putting it back in, after a tidy up. – Alastair Pitts Jan 08 '10 at 04:55
  • 2
    *sigh* The site is back up now. It looks like the VM that runs the website went down hard due to a power outage earlier this morning and hung during the subsequent restart. Sorry about that. – Jeff Brown Jan 08 '10 at 08:18
  • possible duplicate of [NUnit vs. MbUnit vs. MSTest vs. xUnit.net](http://stackoverflow.com/questions/261139/nunit-vs-mbunit-vs-mstest-vs-xunit-net) – nawfal Jul 23 '14 at 15:15

3 Answers3

3

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
  • 74,528
  • 26
  • 112
  • 128
1

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
  • 5,734
  • 10
  • 43
  • 60
  • 1
    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 Jan 08 '10 at 08:21
1

NUnit is more widespread, MbUnit has the most features, but MSTest has more manpower behind it. Check this question out: NUnit vs. MbUnit vs. MSTest vs. xUnit.net

Community
  • 1
  • 1
AnalyticsBuilder
  • 4,111
  • 4
  • 24
  • 36