Mockito Alternatives

Similar projects and alternatives to Mockito

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better Mockito alternative or higher similarity.

Suggest an alternative to Mockito

Mockito reviews and mentions

Posts with mentions or reviews of Mockito. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-06-02.
  • Mockito and non-debuggable testBuildTypes
    2 projects | reddit.com/r/androiddev | 2 Jun 2022
    For those using a "release" testBuildType for integration tests, what does your mocking setup look like? My app is stuck on Mockito 2.23.4, because higher (> 1.8.12) versions of Byte Buddy required beyond that point [do not play nicely with non-debuggable APKs](https://github.com/mockito/mockito/issues/2302). Solutions I've considered so far:
  • Mockito - Most popular Mocking framework for unit tests written in Java
    1 project | reddit.com/r/github_trends | 28 May 2022
  • 20+ Trending and Popular Java Open Source Project
    19 projects | dev.to | 10 May 2022
    Mockito
  • Reverse engineering Mockito. Part 2. Dynamic dependency injection
    1 project | dev.to | 25 Apr 2022
    The code is pretty self explanatory but here's a quick run down. o.getClass().getDeclaredFields() gets us an array of all the fields. We then have a enhanced for loop that loops over the array. Check if the field is annotated field.isAnnotationPresent(Gucci.class). If it is then we set its modifier to true with field.setAccessible(true);. If we don't do this and the field is private we will get an error. Then we get the binary name of the field, field.getGenericType().getTypeName();, remember its just the package and the class name. Lastly we set the value of the field, field.set(o,dynamicInjection(classLoader,binaryName). With that we have now created a dependency injection annotation with the Junit 5 extension model. Now I am sure you can see the tower of exceptions, which is obviously not ideal. I'm not sure how I want to handle all the exceptions yet. However, I will be digging around the Mockito code base to see if I can find how they handle all their exceptions.
  • JVM Testing Newsletter | June 2021
    1 project | dev.to | 2 Jul 2021
    Mockito 3.11.* releases
  • Writing Apache Parquet Files
    2 projects | reddit.com/r/androiddev | 30 May 2021
    Hi, I've been trying to write parquet files on android for the past couple of days, and have really been struggling to find a solution. My original hypothesis was to just use the java parquet implementation (https://github.com/apache/parquet-mr), but I've since realized that not all java libraries play well with Android. I've gone through essentially dependency hell trying to franken-fit the library into my project, and imported as much as i could before hitting walls such as this one (https://github.com/mockito/mockito/issues/841).
  • Can we please stop downvoting people who dislike Rust?
    5 projects | reddit.com/r/rust | 8 Apr 2021
    A lot of that magic on the JVM (Mockito / Spring Boot) relies on proxy objects that intercept method calls, and operate on them in a non-typesafe manner (working on Object[] args, and returning Object). When you use them, it looks type-safe, but under the hood it's all dynamic. Here is an example in Mockito: https://github.com/mockito/mockito/blob/ea000f72444ed4c7e409441aedc3021951b89660/src/main/java/org/mockito/internal/creation/bytebuddy/MockMethodInterceptor.java#L59.

Stats

Basic Mockito repo stats
7
13,040
9.1
5 days ago

mockito/mockito is an open source project licensed under MIT License which is an OSI approved license.

Less time debugging, more time building
Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
scoutapm.com
Find remote jobs at our new job board 99remotejobs.com. There are 4 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.