Best Software for 2025 is now live!
Show rating breakdown
Save to My Lists
Unclaimed
Unclaimed

Top Rated Mockito Alternatives

Mockito Reviews & Product Details

Olga K.
OK
Full Stack Software Engineer
Mid-Market(51-1000 emp.)
More Options
Validated Reviewer
Verified Current User
Review source: G2 invite
Incentivized Review
What do you like best about Mockito?

It's possible to test a lot fo conditions and it's easy to read. Just need to know what's happening inside. Once you learn it, it's clear. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

When you want to debug inside, you actually need google help here. Not everything is obvious. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Creating problems and different scenarios is what's needed in any TDD. We are heavily invested into testing all the bits and pieces of our code, and Mockito is being used all the time. Review collected by and hosted on G2.com.

Mockito Overview

What is Mockito?

Mocking framework for unit tests in Java.

Mockito Details
Show LessShow More
Product Description

Mocking framework for unit tests in Java.


Seller Details
Seller
Mockito
HQ Location
N/A
Twitter
@mockito
51 Twitter followers

Recent Mockito Reviews

Verified User
U
Verified UserEnterprise (> 1000 emp.)
4.5 out of 5
"Mockito - One of the best mocking framework for unit testing"
I like the most that it has huge stack overflow community to help you out. we can verify any interactions and stub our method calls. Using mockito ...
Prathamesh S.
PS
Prathamesh S.Mid-Market (51-1000 emp.)
4.5 out of 5
"Mocking framework used to write clean, simple and effective test cases."
One of the best frameworks out there to create Mock objects to enable testing. Decouples the testing logic from the implementation, making it easie...
Olga K.
OK
Olga K.Mid-Market (51-1000 emp.)
4.5 out of 5
"Perfect tool for testing framework"
It's possible to test a lot fo conditions and it's easy to read. Just need to know what's happening inside. Once you learn it, it's clear.
Security Badge
This seller hasn't added their security information yet. Let them know that you'd like them to add it.
0 people requested security information

Mockito Media

Answer a few questions to help the Mockito community
Have you used Mockito before?
Yes

21 out of 22 Total Reviews for Mockito

4.6 out of 5
The next elements are filters and will change the displayed results once they are selected.
Search reviews
Popular Mentions
The next elements are radio elements and sort the displayed results by the item selected and will update the results displayed.
Hide FiltersMore Filters
The next elements are filters and will change the displayed results once they are selected.
The next elements are filters and will change the displayed results once they are selected.
21 out of 22 Total Reviews for Mockito
4.6 out of 5
21 out of 22 Total Reviews for Mockito
4.6 out of 5

Overall Review Sentiment for MockitoQuestion

Time to Implement
<1 day
>12 months
Return on Investment
<6 months
48+ months
Ease of Setup
0 (Difficult)
10 (Easy)
Log In
Want to see more insights from verified reviewers?
Log in to view review sentiment.
G2 reviews are authentic and verified.
Verified User in Information Technology and Services
UI
Enterprise(> 1000 emp.)
More Options
Validated Reviewer
Verified Current User
Review source: G2 invite
Incentivized Review
(Original )Information
What do you like best about Mockito?

I like the most that it has huge stack overflow community to help you out. we can verify any interactions and stub our method calls. Using mockito in your existing project is the most easy job. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

I am not able to think of any dislike though i would say the more you explore the framework the more you will love working with mockito. Review collected by and hosted on G2.com.

Recommendations to others considering Mockito:

I would recommend mockito framework to everyone who is involved in writing unit test cases as it would make job easy with respect to stubbing your objects. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Mockito helped me in writing some simple and quick test cases. Most of the time we have external dependencies like databases or file interactions that we want to eliminate while unit testing so mockito is helpful at these times. Review collected by and hosted on G2.com.

Prathamesh S.
PS
Software Engineer
Mid-Market(51-1000 emp.)
More Options
Validated Reviewer
Verified Current User
Review source: G2 invite
Incentivized Review
(Original )Information
What do you like best about Mockito?

One of the best frameworks out there to create Mock objects to enable testing.

Decouples the testing logic from the implementation, making it easier to write clean test cases.

Ability to easily mock almost any object as per the requirements. No need to write mock objects on your own. Easiest solution out of the box to support such requirements.

One of the biggest challenges with any testing/mocking framework is the support for refactoring. In Mockito renaming interface method names or reordering parameters will not break the test code as mocks are created at runtime.

Those who work with Junits are well familiar that returning values is a very difficult or tedious task. Mockito however supports return values out of the box. Another blessing is the support for exceptions and ability to easily handle them. Also supports check on order of method calls.

As we get more and more advanced in terms of Java, use of annotations is a great benefit to get rid of the boiler plate code. Mockito supports creating mocks using annotation. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

Though not a steep one but there is a learning curve for sure. You need some kind of background in writing test cases to understand the usage and effectiveness of Mockito.

Mockito doesn't support mocking of local variables, static methods and private methods. Managing mock objects within abstract test cases has been very difficult for me. Review collected by and hosted on G2.com.

Recommendations to others considering Mockito:

When compared to EasyMock, Mockito is hands down the better choice. The ease of use, complimented with the how user friendly the new API names are makes it the default implementation for writing test cases. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Writing readable and clean test cases. Unit testing has become mandatory in the age of Agile, and automating most of this testing using frameworks like Mockito is the need of the hour. Also by increasing the overall application test coverage which directly contributes to increased stability of the application. Review collected by and hosted on G2.com.

Subhodeep D.
SD
Application Developer
Enterprise(> 1000 emp.)
More Options
Validated Reviewer
Verified Current User
Review source: G2 invite
Incentivized Review
What do you like best about Mockito?

Ability of coverage of REST web services. This really helps if there is a complicated scenario in which multiple negative cases might fall into action. It simply makes the process much easier to debug. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

There is nothing I dislike about Mockito in particular. The use of the annotations driven architecture in Spring Boot makes the process of writing test cases much more easier. Review collected by and hosted on G2.com.

Recommendations to others considering Mockito:

Just go through the basic documentation and you should be good to go. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

100% code coverage testing. Positive and negative test case scenarios can be covered. Being able to use Mockito makes it secure to an extent that the possible variations of any web service SOAP/Rest can be leveraged. The ability to mock the service layers or the view layers helps to easily validate complicated WSDL files too. Review collected by and hosted on G2.com.

shrawan a.
SA
Software Engineer
Mid-Market(51-1000 emp.)
More Options
Validated Reviewer
Verified Current User
Review source: G2 invite
Incentivized Review
What do you like best about Mockito?

- Highly Active Community

- Continuous improvement

- Annotation support

- Available for Multiple Platforms

- Clean and Convenient methods Review collected by and hosted on G2.com.

What do you dislike about Mockito?

The only deal-breaker for me would be:

- Proxy-based (No bytecode manipulation)

( But it does seem like its integration with PowerMock still makes it a top choice ) Review collected by and hosted on G2.com.

Recommendations to others considering Mockito:

- An easy and clean Unit testing framework, to test the functionality of a class in isolation in a controlled way.

- Actively maintained, community support and available for multiple platforms Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Working with a large codebase, with constant changes and new features. Mockito supports unit testing with clean and convenient methods to maintain and perform rapid roll out with outstanding code quality. Review collected by and hosted on G2.com.

Verified User in Computer Software
UC
Mid-Market(51-1000 emp.)
More Options
Validated Reviewer
Review source: G2 invite
Incentivized Review
What do you like best about Mockito?

1. Very easy to use.

2. Very less configuration is needed.

3. Provide both annotation as well as class based configuration.

4. I can fully mock an object as well as partially mock an object that is very helpful when I just need to test some methods of a class which I created and leave the other methods which I do not case about.

5. Method name are fluent based so Its very descriptive for others when they read the test cases. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

Not having support of mocking static methods.

Even when static methods are utility methods and that should not require mocking but sometime we get a usecase where it is very hard to actually call static method and we need to mock. Review collected by and hosted on G2.com.

Recommendations to others considering Mockito:

Very good framework for unit testing.

Easy to use. Descriptive and fast. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Very easy to use, And unit testing becomes easier. As well as fluent methods make test cases very informative. Review collected by and hosted on G2.com.

Pranav C.
PC
Enterprise(> 1000 emp.)
More Options
Validated Reviewer
Review source: Seller invite
Business partner of the seller or seller's competitor, not included in G2 scores.
What do you like best about Mockito?

It's easy to learn, easy to interpret, and minimal code needs to be written to setup a mock in mockito. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

Don't see any downsides, it's been perfect tool for the requirements I've faced in my experience. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Writing test cases can be painful, one needs some tool to mock a functionality when writing a test case for a certain method, be it an external call or a complicated method which doesn't needs your attention right now, just mock it and write a test case for the method in hand. Review collected by and hosted on G2.com.

Dhruva A.
DA
Software Engineer
Small-Business(50 or fewer emp.)
More Options
Validated Reviewer
Review source: G2 invite
Incentivized Review
What do you like best about Mockito?

Test code can be decoupled from the implementation.

Creation of the mocks through annotations.

Its ability to integrate easily with the existing projects makes it faster and easy to use. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

So far it has been so good for me. But I am sure any downsides will be greatly outnumbered by the features it has. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

I am using it to write unit test cases and mocking the functionality. It's very easy to learn and use. Review collected by and hosted on G2.com.

Apurva R.
AR
Associate Consultant
Enterprise(> 1000 emp.)
More Options
Validated Reviewer
Review source: G2 invite
Incentivized Review
What do you like best about Mockito?

Mockito offers best platform for easy usage. I can easily mock an object if I need to test some methods of a class and not the whole. It ease to use made my coding life easy. Review collected by and hosted on G2.com.

What do you dislike about Mockito?

It doesn't support mocking static and private methods. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

It helped me write quick test cases . Review collected by and hosted on G2.com.

Sahit B.
SB
Software engineer
Small-Business(50 or fewer emp.)
More Options
Validated Reviewer
Verified Current User
Review source: G2 invite
Incentivized Review
Business partner of the seller or seller's competitor, not included in G2 scores.
What do you like best about Mockito?

I can write very readable and maintained code with mockito Review collected by and hosted on G2.com.

What do you dislike about Mockito?

Since I use mockito I didn't notice something I don't like Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Definitely unit testing Review collected by and hosted on G2.com.

Verified User in Financial Services
CF
Mid-Market(51-1000 emp.)
More Options
Validated Reviewer
Verified Current User
Review source: G2 invite
Incentivized Review
What do you like best about Mockito?

Mocking underlaying database or service, Review collected by and hosted on G2.com.

What do you dislike about Mockito?

mockMvc.perform(xxx)

.andExpect(status().isOk())

.andExpect(MockMvcResultMatchers.jsonPath("$.[0]")

JsonPth matcher syntax is very hard that I dont like. Review collected by and hosted on G2.com.

Recommendations to others considering Mockito:

Sure. I recommend 100% to any other developer. Review collected by and hosted on G2.com.

What problems is Mockito solving and how is that benefiting you?

Mainly Junit test. For unit test I can isolate everything by Mockito. Review collected by and hosted on G2.com.