mockito-1.8.0.zip mockito-1.8.1-rc1.zip mockito-all-1.8.0.jar mockito-all-1.8.1-rc1.jar
FAQ HowToContribute MockitoForPython MockitoVSEasyMock MockitoVSRMock ReleaseNotes Roadmap
News
- 11-11-2009: Mockito 1.8.1-rc1 released. See the release notes.
- 23-07-2009: Mockito 1.8.0 released. See the release notes.
- 24-06-2009: Mockito at Jazoon.
- 07-05-2009: Szczepan mentions Mockito at his session on Great Tests at GeeCON in Krakow.
- 24-01-2009: Mockito 1.7 released. See the release notes.
- 08-12-2008 Mockito at Devoxx 2008 conference in Antwerp.
- 21-10-2008: Mockito 1.6 released. See the release notes.
- 16-10-2008: Mockito presented at JDD 2008 conference in Krakow.
- 07-08-2008: Mockito presented at Agile 2008 conference in Toronto. Here is a short note from the speaker.
Why to drink it?
Mockito is a mocking framework that tastes really good. It lets you write beautiful tests with clean & simple API. Mockito doesn't give you hangover because the tests are very readable and they produce clean verification errors. Read more about features & motivations.
"We decided during the main conference that we should use JUnit 4 and Mockito because we think they are the future of TDD and mocking in Java" - Dan North, the originator of BDD
More quotes
Over 8000 downloads of 1.7 version (Jan'09), excluding maven users
More about the user base
How to drink it?
Put mockito-all-1.8.1-rc1.jar on the classpath. If you use maven then update your pom.xml.
Then you can verify interactions:
Or stub method calls
Click here for more documentation and examples. Remember all documentation lives in javadocs so you don’t need to visit that page too often.
If you have any suggestions, find documentation unclear or you found a bug, write to our mailing list. You can report bugs here.
Who is your bartender?
Mockito is served to you by Szczepan Faber and friends. First people who tried Mockito were developers of the Guardian project in London in early 2008. Here is how Szczepan explained why we need another mocking framework?
Firstly, hats down before EasyMock folks for their ideas on beautiful and refactorable mocking syntax. First hacks on Mockito were done on top of the EasyMock code.
Here are just some of my friends who contributed ideas to Mockito (apologize if I missed somebody): Igor Czechowski, Patric Fornasier, Jim Barritt, Felix Leipold, Liz Keogh, Bartosz Bańkowski
Special thanks to Erik Ramfelt for putting Mockito on his Hudson server (continuous integration).
Thanks to Karol Poźniak for the logo (and a decent web page in future, hopefully :)
Finally, thanks to Erik Brakkee who helps us getting jars to maven central