People call them frameworks, but the way i see it, they're libraries.
Information correct as of 2011-06-12. Bold indicates a reason to seriously consider a particular library. I should really add columns for 'Mocks statics?', 'Mocks finals?', 'Strict expectations?', and various other things.
|Library||First Release||Latest Release||Google Hits||Mocks Classes?|
|jMock||1.1.0||2007-03-27||2.5.1||2008-08-24||249k||✓ (with jMock Legacy)|
|JMockLib (aka MockLib)||1.1.2||2005-05-08||3.1.1||2009-02-11||4.15k||?|
|Mockachino||0.1||2010-02-06||0.5.1||2011-01-21||2.34k||✓ (with Objenesis?)|
Also, check out Powermock, which is a third-party add-on which turbocharges other libraries.
|EasyMock||2009-01 2010-12-17||2010-12-17 2010-06-27 2010-11-01||2010-11-01|
|jMock||2010-10? 2010-12-17 2010-08-01||2010-11-01|
See also some general comparisons, both definitely worth reading:
Most of these libraries were written as a response to the landscape of other libraries which existed at the time, in an attempt to improve on them. However, it does seem that most libraries were a response to some specific set of predecessors. Using a highly advanced guesswork-based process, i have determined that the predecessors of each library are:
If each library was successful at improving on its predecessors, then the only libraries which have not so far been improved on are JMockit, Mockachino, and Moxie.
And by you, i mean me.