Test failure diagnostics in mocking frameworks

August 2, 2009 17:34


There's another update in Mocking Frameworks Compare project, with the main focus on
test failure diagnostics.

Do you like internal messages you receive from your mocking framework? A usual answer is "sometimes yes, sometimes no".
Now you can compare what different frameworks return in similar situations (unexpected method call, or expected method call with incorrect parameters, and so on).

Just download mfcompare-1.4, set FailureDiagnostics as a startup project and run it (
I added only a few basic cases, with more scenarios slated for the next drop). As usual, your ideas are highy welcome - comment either here or directly on the wiki.

A few things that are salient right now:
  • Error messages vary in different frameworks, and a message might look unreadable just because you're used to a different format. Look at a message as a newbie - if it's obvious enough for a newbie, it's good. Not vise versa.   
  • Isolator does not support custom error messages at all.
  • In NMock2 your custom messages come after it's internal ones - I think it's more useful the other way around (Moq and Rhino display custom messages first).
  • With Stubs all error messages are custom - it doesn't have an API and thus no internal messages available.
A quck overview of other changes:
  • Test samples for Stubs on partial and recursive mocks are available.
  • Test samples for NMock2 on partial mocks are available.
  • Performance comparison has been updated to cover the new scenarios.

Comments

Comments are closed