MbUnit is a "better xUnit" that's used by a myraid of folks I respect, including James Avery, Patrick Cauldwell and Phil Haack. It's under very active development, even though I'd once wondered aloud if it was "abandonware." It's decidedly not and it's just got a new facelift to prove it.

Check out James Avery's Post called "I've seen the light and it is called MbUnitr." I've asked around and everyone has nothing but nice things to say what MbUnit brings to the table. It's NOT just NUnit with some tweaks. James says it's "Unit testing on crack."

Check this out...the test will get called four times, each time with different values passed in, some intending to cause and exception and others not. Very clean and certainly nicer than making a dozen methods like "NegativeTest54".

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

Am I the only one that don't find that quite as readable as otherwise good refactored regular test code? Plus, I'm not really all that keen at putting both failure and success tests in the same place like that. But certainly will give it a try, looks interesting!

Crap! I clicked on the link to the new facelift and started to party. Only I've been using the recent version for a little while now... so I got all excited for nothing *sniff*.

The ONLY thing that could make MbUnit better would be if it would somehow magically release assemblies (or pull them in via Shadow Copy) each time it finished a batch of tests. I'm sadly quite an iterative tester at points and find myself constantly wanting to rebuild/tweak/etc, and therefore have to keep unloading and reloading my assemblies in the GUI otherwise I can't build correctly...

I'm very new to TDD and testing so this question may have an obvious answer but doesn't this mix test code and production code?

Marlun

Wednesday, September 20, 2006 5:50:06 AM UTC

Ah, I see now that it doesn't, just fooled me.

Marlun

Wednesday, September 20, 2006 11:18:24 AM UTC

I'm afraid that I'd have to disagree.... in part.

First, let me say that MbUnit is probably better than NUnit - I use both depending on which features I require.

However, no matter how many facelifts it's had (and it has moved about a few times since I started using it a year ago), I don't think that with the last release being an RC1 in February it can yet be labelled as anything other than Abandonware.

Hopefully, this will be the relocation that spells the beginning of a new development cycle.

Just my thoughts.

Carl

Wednesday, September 20, 2006 4:51:56 PM UTC

hi there,

cool.

TestNG(http://testng.org/doc/ -- java unit testing library inspired from jUnit and NUnit) has been having this feature for a while . Yes, it is very useful.

This is an integration test, not a unit test. The practical importance here is that an external resource is required for tests to pass. When running a unit test suite it is expected that no such setup is required. For example, a new developer should be able to grab code from source tree and execute unit tests with no failures.

Well, just what you see here doesnt tell you if it requires external resources. Usually when I work with this sort of setup I would use a strategy pattern or IOC to tell the user where to retrieve or save itself to. So, for testing purposes I could inject a mock repository.

I am not a contributor to the trunk of the current version or the next v3. I have however helped from time to time with infrastructure and documentation. I have written extensions as well.There has been work on the next version of MbUnit, version 3.0, going on for a little while. It is very early in the cycle.Here is some impartial info on the project, you can make a more informed judgement.

Google Groups:MbUnit.Dev - 62 Members with 60 posts last monthMbUnit.User - 120 Members with 35 posts last month

8 Dev Leaders with rights to Subversion

Here is the Svn FishEye:http://www.mertner.com/fisheye/browse/MbUnit

4 Devs committing changes in Aug264 files changes/28 revisions in Aug

To compare to NUnit

Mailing List:Dev - 138 Members with 32 posts last monthUser - 195 Members with 19 posts last month

7 Dev Leaders with rights to Subversion

Here is the Cvs commit list:http://sourceforge.net/mailarchive/forum.php?forum_id=11797

I have been trying out some on the features that nUnit doesn't have. I work mostly in vb.net and have yet to get the RowTest with an ExpectedException to compile. Does anybody have a vb.net example of this? I can use RowTest / Row without problem. It is only when try to add the exception that it fails. This is the C# example from the wiki: [Row(1,0,0, ExpectedException = typeof(ArithmeticException))].

Cheers,

Aaron

P.S. This might be a double post. The page recycled with no indication of success or failure the first time I submitted.

Aaron,That is a limitation of VB.NET. If you need help with MbUnit the best place to go is the Google group.http://groups.google.com/group/MbUnitUser?lnk=oaor for Devs of MbUnithttp://groups.google.com/group/MbUnitDev?lnk=oa

If you search in the group for your problem I know that you will find a thread dealing with your exact issue.

The facelift mentioned above is not just to the MbUnit home page, but also to the reports and GUI. This should all be included in an upcoming RC2. Unfortunately the interim builds are a little harder to find from the new home page, so you may want to download MbUnit 2.3.71 from here: http://build.mutantdesign.co.uk/builds/MbUnit-2.3.71.exeNote that this build does not have the issue reported by Jeff Campbell above.

As to the question of "abandonware," I think that if you need to download a new unit testing framework every couple months then something is wrong. New builds were made available, for example, with the release of .NET 2.0 to make it available for that environment. I prefer to see it as a stable product, that people are using the real world.

And yes, some of what makes MbUnit popular is that you can use the same framework for integration testing. Some people might not want to blur this line, and might be philosphically happier with NUnit. A lot of us like MbUnit because it just gives us a way to test whatever we think needs testing.