Mockito

Mock objects library for java

License

License

Categories

Categories

Mockito Unit Testing
GroupId

GroupId

org.mockito
ArtifactId

ArtifactId

mockito-all
Last Version

Last Version

2.0.2-beta
Release Date

Release Date

Type

Type

jar
Description

Description

Mockito
Mock objects library for java
Source Code Management

Source Code Management

http://github.com/mockito/mockito

Download mockito-all

How to add to project

<!-- https://jarcasting.com/artifacts/org.mockito/mockito-all/ -->
<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-all</artifactId>
    <version>2.0.2-beta</version>
</dependency>
// https://jarcasting.com/artifacts/org.mockito/mockito-all/
implementation 'org.mockito:mockito-all:2.0.2-beta'
// https://jarcasting.com/artifacts/org.mockito/mockito-all/
implementation ("org.mockito:mockito-all:2.0.2-beta")
'org.mockito:mockito-all:jar:2.0.2-beta'
<dependency org="org.mockito" name="mockito-all" rev="2.0.2-beta">
  <artifact name="mockito-all" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.mockito', module='mockito-all', version='2.0.2-beta')
)
libraryDependencies += "org.mockito" % "mockito-all" % "2.0.2-beta"
[org.mockito/mockito-all "2.0.2-beta"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.
Mockito

Most popular mocking framework for Java

CI Coverage Status MIT License

Release Notes Maven Central Bintray Javadoc

Current version is 3.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 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 continuously delivers improvements using Shipkit library (http://shipkit.org). See the latest release notes and latest documentation. Docs in javadoc.io are available 24h after release. Read also about semantic versioning in Mockito. Note: not every version is published to Maven Central.

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

Mockito implements Continuous Delivery model. Every change on the main branch (for example merging a pull request) triggers a release build on CI. The build publishes new version if specific criteria are met: all tests green, no 'ci skip release' used in commit message, see the build log for more information. Every new version is published to "mockito/maven" Bintray repository. New versions that Mockito team deems "notable" are additionally published to Maven Central and JCenter. We used to publish every version to Maven Central but we changed this strategy based on feedback from the community (#911).

  • Q: What's new in Mockito release model?

    A: In Q2 2017 we implemented Mockito Continuous Delivery Pipeline 2.0. Not every version is published to Maven Central.

  • Q: How to publish to Maven Central?

    A: Include "[ci maven-central-release]" in the merge commit when merging the PR. Hint: To signify a new feature consider updating version to next minor/major, like: "2.8.0", "2.9.0", "3.0.0".

  • Q: How to promote already released version to a notable version?

    A: It isn't automated at the moment. What's the use case?

org.mockito

mockito

Mockito framework

Versions

Version
2.0.2-beta
2.0.1-beta
2.0.0-beta
1.10.19
1.10.18
1.10.17
1.10.16
1.10.8
1.10.7
1.10.5
1.9.5
1.9.5-rc1
1.9.0
1.9.0-rc1
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.1-rc1
1.8.0
1.8.0-rc2
1.8.0-rc1
1.7
1.6
1.5
1.4
1.3
1.2
1.1