My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

Current release

16-12-2011: Mockito 1.9.0 released. See the release notes. Should appear in maven central shortly.

Older information

Why 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 10000 downloads of 1.7 version (early '09), excluding maven users. For latest figures see the downloads.
More about the user base

How do I drink it?

Download mockito-all-x.x.x.jar and put it on the classpath. Are you mavenized? -> Click HERE for maven instructions <-

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

Powered by Google Project Hosting