|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Testify||20,614||14,688||70,426||2 days ago||42||May 30, 2023||423||mit||Go|
|A toolkit with common assertions and mocks that plays nicely with the standard library|
|Mockito||14,196||38,950||13,120||7 days ago||343||June 18, 2023||357||mit||Java|
|Most popular Mocking framework for unit tests written in Java|
|Mockery||10,466||112,379||18,261||16 days ago||40||July 19, 2023||106||bsd-3-clause||PHP|
|Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL).|
|Go Sqlmock||5,425||1,336||a month ago||21||June 28, 2020||75||other||Go|
|Sql mock driver for golang to test database interactions|
|Mockk||5,087||13 hours ago||250||apache-2.0||Kotlin|
|mocking library for Kotlin|
|Mockery||5,021||277||a day ago||134||August 04, 2023||38||bsd-3-clause||Go|
|A mock code autogenerator for Go|
|Powermock||4,064||8,089||2,266||4 months ago||38||November 01, 2020||448||apache-2.0||Java|
|PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.|
|Pester||2,929||42||6||2 months ago||91||April 05, 2023||155||other||PowerShell|
|Pester is the ubiquitous test and mock framework for PowerShell.|
|Vcrpy||2,478||860||156||11 days ago||70||July 31, 2023||131||mit||Python|
|Automatically mock your HTTP interactions to simplify and speed up testing|
|Nsubstitute||2,349||6 days ago||113||other||C#|
|A friendly substitute for .NET mocking libraries.|
Most popular mocking framework for Java
Still on Mockito 1.x? See what's new in Mockito 2! Mockito 3 does not introduce any breaking API changes, but now requires Java 8 over Java 6 for Mockito 2. Mockito 4 removes deprecated API. Mockito 5 switches the default mockmaker to mockito-inline, and now requires Java 11. Only one major version is supported at a time, and changes are not backported to older versions.
Available as part of the Tidelift Subscription.
The maintainers of org.mockito:mockito-core and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
Mockito publishes every change as a
-SNAPSHOT version to a public Sonatype repository. Roughly once a month, we
publish a new minor or patch version to Maven Central. For release automation we use Shipkit
library (http://shipkit.org), Gradle Nexus Publish Plugin.
Fully automated releases are awesome, and you should do that for your libraries, too!
See the latest release notes
and latest documentation. Docs in
javadoc.io are available 24h after release. Read also
about semantic versioning in Mockito.
Want to contribute? Take a look at the Contributing Guide.
To build locally:
To develop in IntelliJ IDEA you can use built-in Gradle import wizard in IDEA. Alternatively generate the importable IDEA metadata files using:
Then, open the generated *.ipr file in IDEA.
-SNAPSHOTversion to Sonatype snapshot repo at https://s01.oss.sonatype.org/content/repositories/snapshots/org/mockito/mockito-core.
git tag -a -m "Release 3.4.5" v3.4.5 git push origin v3.4.5