Geeks With Blogs
Caffeinated Coder A Grande, Triple Shot, Non-Fat Core Dump by Russell Ball
I've played with MbUnit before and was immediately impressed, but I haven't tried using it on a project until today. I was surprised by how quickly and easily I was able to convert all of my NUnit tests. All I had to do was switch the references from NUnit.Framework to MbUnit.Framework and then do a quick find and replace for my using statements. After that everything magically worked. Kudos to the MbUnit team for not pulling an 'MSTest' move and renaming all the attributes and keywords.

Best of all, I was able to add several new tests quickly by simply adding parameters to my test methods and then using the MbUnit Row attribute to dynamically pass in multiple values. This simple feature not only helped eliminate quite a bit of duplicate test code, but it also encouraged me to exercise my code with more test data which immediately led me to find some new bugs.

I especially like how the MbUnit test runner lists each parameter as a separate test so you can easily see which one of the data elements caused the problem. It's also nice to have multiple views of the test at the same time (Author/Category/Namespace).

If you haven't already tried using MbUnit, I highly recommend it. There is almost no effort involved in learning to use it, especially if you've ever used NUnit.
Posted on Friday, October 19, 2007 5:22 PM Software Development Practices , Tools | Back to top

Comments on this post: In Praise of MbUnit

# re: In Praise of MbUnit
Requesting Gravatar...

I also posted my praise for MbUnit. I specially liked the RowTest and Rollback feature. You should also look into NCover which shows the test coverage of your code.


Left by Mohammad Azam on Oct 19, 2007 6:27 PM

# re: In Praise of MbUnit
Requesting Gravatar...
@Azam - Helpful posts. I've used TFS test coverage, but haven't used NCover. Since I just started someplace that doesn't use TFS, I'll be digging into NCover soon enough. BTW - I like the subtitle to your blog.
Left by Russell Ball on Oct 25, 2007 10:31 PM

Your comment:
 (will show your gravatar)

Copyright © Russell Ball | Powered by: