mockito 0,0,3,38,0,20,7,5

Most popular Mocking framework for unit tests written in Java


Most popular mocking framework for Java

Build Status Coverage Status MIT License

latest release Latest release Maven Central Javadocs

Current version is 2.x

Still on Mockito 1.x? See what’s new in Mockito 2!

Mockito continuously delivers improvements. See the latest release notes and latest documentation. Docs in are available 24h after release. Read also about semantic versioning in Mockito.

Older 1.x releases are available in Central Repository , Bintray and (documentation).

More information

All you want to know about Mockito is hosted at The Mockito Site which is Open Source and likes pull requests, too.

Want to contribute? Take a look at the Contributing Guide.

Enjoy Mockito!

Need help?

How to develop Mockito?

To build locally:

 ./gradlew build

To develop in IntelliJ IDEA you can use built-in Gradle import wizard in IDEA. Alternatively generate the importable IDEA metadata files using:

 ./gradlew idea

Then, open the generated *.ipr file in IDEA.

How to release new version?

Mockito implements Continuous Delivery model. Every change on main branch (for example merging a pull request) triggers Travis CI release build. The build publishes new version if criteria are met: all tests green, no ‘ci skip release’ used in commit message, see the build log for more. New version is published to “mockito/maven” Bintray repository. Notable versions are automatically included in JCenter and Maven Central.

  • Q: What’s new in Mockito release model? What are notable versions?

A: In April 2017 we implemented Mockito Continuous Delivery Pipeline 2.0.

  • Q: How to publish new notable version?

A: Update “” file and set the next minor/major version like: “2.8.0”, “2.9.0”, “3.0.0”.

  • Q: How to promote already released version to a notable version?

A: There is no easy way at the moment. What’s the use case?

  • Q: How to publish new notable version that is not a new minor/major (e.g. “2.8.34”)?

A: There is no easy way at the moment but we’re planning to add this. Want to contribute?

Related Repositories



Most popular Mocking framework for unit tests written in Java ...



Android Boilerplate project using RxJava, Dagger 2, Espresso, Mockito + more! ...



Mockito for Objective-C: creation, verification and stubbing of mock objects ...



Gradle + Android Studio + Robolectric + Espresso + Mockito + EasyMock/PowerMock + JaCoCo ...



Using Mockito with Kotlin ...

Top Contributors

szczepiq bric3 continuous-delivery-drone raphw PascalSchumacher iczechowski TimvdLippe bbankowski lukasz-szewc pimterry marcingrzejszczak szpak ChristianSchwarz Dawud-xx davidkarlsen pbielicki lpandzic wernight jerzykrlk alberskib josephw ffbit mkordas guw hansjoachim hughwphamill ianparkinson kamilszymanski dmac100 brewerc


-   vrbranch zip tar
-   v2.1.0-beta.126 zip tar
-   v2.1.0-beta.125 zip tar
-   v2.1.0-beta.124 zip tar
-   v2.1.0-beta.123 zip tar
-   v2.1.0-beta.121 zip tar
-   v2.1.0-beta.120 zip tar
-   v2.1.0-beta.119 zip tar
-   v2.1.0-RC.1 zip tar
-   v2.0.111-beta zip tar
-   v2.0.110-beta zip tar
-   v2.0.109-beta zip tar
-   v2.0.108-beta zip tar
-   v2.0.107-beta zip tar
-   v2.0.106-beta zip tar
-   v2.0.105-beta zip tar
-   v2.0.104-beta zip tar
-   v2.0.103-beta zip tar
-   v2.0.102-beta zip tar
-   v2.0.101-beta zip tar
-   v2.0.100-beta zip tar
-   v2.0.99-beta zip tar
-   v2.0.98-beta zip tar
-   v2.0.97-beta zip tar
-   v2.0.96-beta zip tar
-   v2.0.95-beta zip tar
-   v2.0.94-beta zip tar
-   v2.0.93-beta zip tar
-   v2.0.92-beta zip tar
-   v2.0.91-beta zip tar