I’ve recently undertaken another round of evaluating .NET mocking (fake/substitute/dummy/stub/ or what ever you want to call them now) libraries. Interestingly the landscape has changed quite a bit since last time I went through this exercise, which was about two years ago. The outcome of the previous investigation is at the bottom of this post.
Evaluation criterion
- Who is the creator. I’ve favoured teams rather than individuals, as individuals move on, then where does that leave the product? RhinoMocks is a prime example of this. It’s was an excellent library. maybe a new owner, maybe not.
- Does it do what we need it to do?
- Are there any integration problems with all of our other chosen components? Works with .Net versions the development team are using. Any other complaints around integration?
- Cost in money. Is it free? Are there catches once you get further down the road? Usually open source projects are marketed as is. No catches
- Cost in time. Is the set-up painful? Customisation feedback? Upgrade feedback?
- How well does it appear to be supported? What do the users say?
- Documentation. Is there any / much? What is it’s quality?
- Community. Does it have an active one? Are the users getting their questions answered satisfactorily? Why are the unhappy users unhappy (do they have a valid reason).
- Release schedule. How often are releases being made? When was the last release?
How the Playing Field Looks Today
NSubstitute (new style)
FakeItEasy (new style)
JustMock
Moq
Rhino Mocks
How the Playing Field Looked Two Years Ago
Rhino Mocks
Free and open source.
Very full featured.
Easy enough to use.
logical and consistent syntax.
Most up to date documentation (best place to start)
somewhat out of date documentation, but more of it than the above link.
Community, Download, More code examples here.
Example of the old record/playback syntax as opposed to the new AAA syntax.
Keeping up to date on the progress of Rhino Mocks.
The most popular mocking framework two years ago.
Moq
Clean discoverable API design and lack of complicated record/playback model, which is nice.
Have used this, and haven’t had any issues I couldn’t get around.
Very easy to learn and use.
TypeMock
Commercial product (expensive, so not really viable).
Ability to mock anything including statics, privates and events on multiple languages.
NMock
Appears to be abandoned
Tags: .NET, dummy, fake, FakeItEasy, faking, Free and open source, JustMock, mock, mocking, Moq, NMock, NSubstitute, Rhino Mocks, sbubbing, stub, stubbing, substitute
December 16, 2013 at 12:52 |
Appreciating the persistence you put into your site and detailed information you offer.
It’s awesome to come across a blog every once in a while
that isn’t the same unwanted rehashed information.
Wonderful read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.
December 21, 2016 at 23:42 |
Question: What is a duck doing in your post?