All Projects → mockito → Mockito

mockito / Mockito

Licence: mit
Most popular Mocking framework for unit tests written in Java

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Mockito

Mockito Scala
Mockito for Scala language
Stars: ✭ 231 (-98.15%)
Mutual labels:  testing-tools, mock, test-automation, test-driven-development, mockito, mocking-framework
umock-c
A pure C mocking library
Stars: ✭ 29 (-99.77%)
Mutual labels:  mock, mocking, mock-library, mocks, mocking-framework
mock-inspect
Mocks network requests and allows you to make assertions about how these requests happened. Supports auto-mocking of graphQL requests given a valid schema.
Stars: ✭ 19 (-99.85%)
Mutual labels:  mocking, testing-tools, mocks, mocking-framework
Nsubstitute
A friendly substitute for .NET mocking libraries.
Stars: ✭ 1,646 (-86.78%)
Mutual labels:  testing-tools, mock, mocking, mocks
mockingbird
🐦 Decorator Powered TypeScript Library for Creating Mocks
Stars: ✭ 70 (-99.44%)
Mutual labels:  mock, mocking, mock-library, mocks
Mockaco
🐵 HTTP mock server, useful to stub services and simulate dynamic API responses, leveraging ASP.NET Core features, built-in fake data generation and pure C# scripting
Stars: ✭ 213 (-98.29%)
Mutual labels:  mock, mocking, mocks
Retromock
Java library for mocking responses in a Retrofit service.
Stars: ✭ 48 (-99.61%)
Mutual labels:  mock, mocking, testing-tools
Httpretty
Intercept HTTP requests at the Python socket level. Fakes the whole socket module
Stars: ✭ 1,930 (-84.5%)
Mutual labels:  testing-tools, mock, mocking
DeepfakeHTTP
DeepfakeHTTP is a web server that uses HTTP dumps as a source for responses.
Stars: ✭ 373 (-97%)
Mutual labels:  mock, test-automation, testing-tools
main
Mocks Server monorepo
Stars: ✭ 109 (-99.12%)
Mutual labels:  mock, test-automation, testing-tools
servirtium-java
Service Virtualized HTTP - to help service test automation stay fast and consistent
Stars: ✭ 16 (-99.87%)
Mutual labels:  test-automation, testing-tools, mocking-framework
Mockolo
Efficient Mock Generator for Swift
Stars: ✭ 327 (-97.37%)
Mutual labels:  mock, mocking, mocking-framework
laika
Log, test, intercept and modify Apollo Client's operations
Stars: ✭ 99 (-99.21%)
Mutual labels:  mock, mocking, testing-tools
mockcpp
Two C/C++ testing tools, mockcpp and testngpp.
Stars: ✭ 40 (-99.68%)
Mutual labels:  mockito, testing-tools, test-driven-development
Msw
Seamless REST/GraphQL API mocking library for browser and Node.js.
Stars: ✭ 7,830 (-37.12%)
Mutual labels:  mock, mocking, mocking-framework
Kakapo.js
🐦 Next generation mocking framework in Javascript
Stars: ✭ 535 (-95.7%)
Mutual labels:  mock, mocking, mocking-framework
Moka
A Go mocking framework.
Stars: ✭ 53 (-99.57%)
Mutual labels:  mock, mocking, test-driven-development
Beanmother
A library for setting up Java objects as test data.
Stars: ✭ 102 (-99.18%)
Mutual labels:  testing-tools, test-automation, test-driven-development
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-99.67%)
Mutual labels:  test-automation, testing-tools, test-driven-development
chrome-extension-mocker
The most convenient tool to mock requests for axios, with built-in Chrome extension support.
Stars: ✭ 37 (-99.7%)
Mutual labels:  mock, mocking, mock-library
Mockito

Most popular mocking framework for Java

CI Coverage Status MIT License

Release Notes Maven Central Javadoc

Current version is 4.x

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 for enterprise

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.

Development

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.

Older 1.x and 2.x releases are available in Central Repository and javadoc.io (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?

  1. Every change on the main development branch is released as -SNAPSHOT version to Sonatype snapshot repo at https://s01.oss.sonatype.org/content/repositories/snapshots/org/mockito/mockito-core.
  2. In order to release a non-snapshot version to Maven Central push an annotated tag, for example:
git tag -a -m "Release 3.4.5" v3.4.5
git push origin v3.4.5
  1. At the moment, you may not create releases from GitHub Web UI. Doing so will make the CI build fail because the CI creates the changelog and posts to GitHub releases. We'll support this in the future.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].