Timeline for What's the best mock framework for Java?
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 13, 2015 at 2:33 | history | edited | Michael Butler | CC BY-SA 3.0 |
updated with link to current Mockito repository (hosted now on Github)
|
| Mar 20, 2013 at 18:51 | comment | added | SamStephens | @MexicanHacker looks like there's been some work in Mockito recently to support Android. I don't know anything about it, but it's mentioned here: docs.mockito.googlecode.com/hg/1.9.5/org/mockito/… | |
| Mar 20, 2013 at 18:49 | comment | added | SamStephens | As Jan Kronquist says in his answer, you can use PowerMock to extend Mockito if you need to mock static methods. | |
| Mar 8, 2012 at 7:37 | comment | added | Renato | I'm using Mockito and loving it!! Great documentation too (so rare to find documentation of this quality, good job from the authors), which is so important for us to use stuff without having to dig into the framework's code!!! | |
| Jul 14, 2011 at 18:09 | comment | added | Jeff Axelrod | @MexicanHacker, PowerMock extends Mockito so you can run Android tests natively on the host PC. | |
| Jun 25, 2011 at 1:07 | comment | added | Jaime Hablutzel | I´ve experienced with EasyMock and I find it quite easy to use... so if mockito is easier I guess it is REALLY easy and it deserves a try. | |
| Mar 22, 2011 at 0:25 | comment | added | MexicanHacker | @Ilkka It's hard to remember now, the problem was in March 2010, at that moment mockito was not able to mock finals, which is something you'll find a lot in Dalvik, here is more info: sites.google.com/site/androiddevtesting | |
| Mar 19, 2011 at 18:57 | comment | added | Ilkka | @MexicanHacker why couldn't you use it for Android? I'm using it right now, with Robolectric. | |
| Mar 2, 2011 at 15:24 | comment | added | Brian Laframboise | For me, absolutely. I would still recommend it unconditionally. Of course, if you find another framework that better meets your needs, mention it in another answer and see what votes it gets and what kinds of comments it receives. | |
| Mar 19, 2010 at 18:28 | comment | added | MexicanHacker | The only think I don't like about mockito is that you cannot use it for android, other than that is a great framework | |
| Feb 5, 2010 at 21:26 | comment | added | mxk | +1 for Mockito. Even though nowhere mentioned, it seems heavily inspired by Ruby's Mocha framework (which is great). | |
| Jun 27, 2009 at 12:00 | comment | added | ripper234 | I love how when you try to do something you shouldn't (e.g. create mocks inline), you get a very clear explanation of what you did wrong in the exception message. | |
| Mar 13, 2009 at 14:26 | comment | added | John Goering | Beautiful. For static methods, simply combine Mockito with JMockit and there is practically no class too "legacy" for you to be able to test. | |
| Oct 3, 2008 at 18:15 | vote | accept | Josh Brown | ||
| Aug 22, 2008 at 18:02 | history | answered | Brian Laframboise | CC BY-SA 2.5 |