Andrew Stopford's Weblog

poobah

News

Articles

Family

Old Blogs

James Avery talks about MbUnit at Cincinnati-Dayton Code Camp 2007

James Avery gave a session at the Cincinnati-Dayton Code Camp 2007 titled "MbUnit: Unit Testing for People who Love Unit Testing", he talked about some his fave features from 2.* including RowTest, Pairwise, Repeat and Rollback2 (the Rollback fixture for .NET 2.0). His slides for the session can be found here. I really hope this session was filmed as it would be great to hear what James said around the slides and what folks feedback\questions to James were.
Posted: Mar 25 2007, 10:32 PM by andrewstopford | with 2 comment(s)
Filed under: ,

Comments

James Avery said:

Sorry, it wasn't filmed. As for feedback everyone seemed to be very impressed, I have had a number of people tell me they are definitely going to switch from nUnit or Team System to MbUnit.

RowTest and PairWise would probably the biggest hits, especially when I showed the PairWise example that generated 418 tests. The only real question around PairWise was how to come up with the expected value for your assertion. In my example I basically duplicate the logic on the method to come up with the expected result.

The answer was basically that I think PairWise is best for ensuring no unexpected results are coming back, but not necessarily best for checking calculations. You could use it to make sure none of the possible inputs throw an exception, return a value less than 0, etc. Although it might be interesting to be able to specify another factory for returning the expected result. (can you already do that?)

-James

# March 25, 2007 8:44 PM

andrewstopford said:

Pairwise and row will drill across a range of values between x and y. It's really intended to throw a wide net over your tests, you could then combine with code coverage to check you don't have plains of untested code showing up and that your checking for the unexpected in your code. I'd double up with a more directed test to check expected against actual as well as a wide net test so you get the best of both worlds.

# March 26, 2007 6:14 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)