Skip to content

Mockito Popularity and User Base

Szczepan Faber edited this page Mar 3, 2017 · 7 revisions

Estimated 2M users, Top 3 Java library

Multiple studies were done on popularity of Java libraries, using very large representative sample of Open Source projects from GitHub. Study from 2016 places "mockito-all" on 7th place. Mockito is actually number #3 library because the study considers "mockito-all" and "mockito-core" artifacts as different libraries. If you look at the raw data of the study and combine the result of "mockito-core" and "mockito-all", Mockito jumps to 3rd place surpassing even Guava.

  • Historical studies (2015, 2013) also rank Mockito in top java libraries, ~3rd place for "mockito-all" + "mockito-core" combined.
  • Stack Overflow community-accepted answer to "What's the best mock framework for Java?" is Mockito.
  • We estimate number of Mockito users to be 2M, based on simple math: according to Oracle (2017 JavaOne data), there are ~10M java engs. Let's say half of them write unit test (very sad but probably true). Let's say half of the remainder uses Mockito.

Quotes (no longer maintained)

When Mockito hit the mainstream we stopped maintaining and adding new quotes.

Dan North, the originator of BDD, about the workshop at JAOO 2008 conference:

It was a 'late substitution'. 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 ;)

Ola Bini, core developer of JRuby, in article Java and mocking:

We have been using Mockito for testing which is a first for me. My immediate impression is quite good. It's a nice tool and it allows some very clean testing of stuff that generally becomes quite messy.

Hamlet D'Arcy on his blog:

Mockito really cleans up the unit test by not requiring expectations. Personally, I much prefer the Mockito API to the EasyMock API for that reason.

Technophilia on Mockito's Most helpful stacktrace:

"....Now, I think Mockito has taken over the mantle of the King of error messages. Just as my swooning over Mockito was at its zenith, I encountered the following stacktrace...."

"....How cool is that! Hats off Mockito-team. This developer appreciates the extra few minutes you took to put together that message. It helped me immensely...."

Zach Shaw compared EasyMock vs Mockito:

The google testing blog just published an article Use EasyMock I guess I just disagree. Mockito grew out of EasyMock, and I think they took a great library and made it even better, so I really think the title of the post should have been 'Use Mockito' not EasyMock. Anyway... there's a whole lot more that Mockito does check out the examples and get off the EasyMock and start drinking the Mockito :P

Dhalia Bock calls to drink that Mockito!:

Do yourself and your team a favor and download Mockito and use it. Your sanity will thank you for it.

Ketan Padegaonkar on his blog:

This looks, and reads far better than the JMock syntax, and it was love at first sight; I'm test-infested now.

Jay Fields about ubiquitous assertion syntax:

In Java, the Mockito framework represents a step in the right direction, moving the mock expectations to the end of the test.

Phil Wills blogged:

Mockito makes you think

alittlemadness.com presents an article about stubbing

The difference with Mockito is that stubbing and verification are separated (...) This separation works brilliantly when you don’t want to verify everything by default

infoQ article on Mockito 1.5

Piotr Jagielski's article