{"id":13440235,"url":"https://github.com/mockito/mockito","last_synced_at":"2026-10-18T22:03:33.078Z","repository":{"id":5046548,"uuid":"6207167","full_name":"mockito/mockito","owner":"mockito","description":"Most popular Mocking framework for unit tests written in Java","archived":false,"fork":false,"pushed_at":"2026-10-13T14:34:39.000Z","size":49772,"stargazers_count":15454,"open_issues_count":504,"forks_count":2673,"subscribers_count":412,"default_branch":"main","last_synced_at":"2026-10-13T15:26:37.553Z","etag":null,"topics":["java","java-library","mock","mock-library","mocking","mocking-framework","mockito","mocks","test-automation","test-driven-development","testing","testing-tools"],"latest_commit_sha":null,"homepage":"http://mockito.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"OCA/product-attribute","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mockito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","accessibility":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null},"funding":{"tidelift":"maven/org.mockito:mockito-core"}},"created_at":"2012-10-13T20:27:12.000Z","updated_at":"2026-10-13T14:34:54.000Z","dependencies_parsed_at":"2026-09-14T00:57:59.954Z","dependency_job_id":"9a41a763-655c-459b-a3ab-7808c71676ce","html_url":"https://github.com/mockito/mockito","commit_stats":{"total_commits":5691,"total_committers":353,"mean_commits":"16.121813031161473","dds":0.520646635037779,"last_synced_commit":"942d8ceb4612b9956462ba43f47ca56e5cd1f260"},"previous_names":[],"tags_count":653,"template":false,"template_full_name":null,"purl":"pkg:github/mockito/mockito","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockito%2Fmockito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockito%2Fmockito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockito%2Fmockito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockito%2Fmockito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mockito","download_url":"https://codeload.github.com/mockito/mockito/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockito%2Fmockito/sbom","scorecard":{"id":542651,"data":{"date":"2025-08-11","repo":{"name":"github.com/mockito/mockito","commit":"144751b053da44970d78a31b65a0eb9a780a86fa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7.5,"checks":[{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":8,"reason":"Found 5/6 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:196","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:18"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:133: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:174: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:184: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:208: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:213: update your workflow using https://app.stepsecurity.io/secureworkflow/mockito/mockito/ci.yml/main?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:194"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T08:37:23.363Z","repository_id":5046548,"created_at":"2025-08-20T08:37:23.364Z","updated_at":"2025-08-20T08:37:23.364Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":343843146,"owners_count":38277740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-13T02:00:04.984Z","response_time":52,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","java-library","mock","mock-library","mocking","mocking-framework","mockito","mocks","test-automation","test-driven-development","testing","testing-tools"],"created_at":"2024-07-31T03:01:20.943Z","updated_at":"2026-10-18T22:03:33.058Z","avatar_url":"https://github.com/mockito.png","language":"Java","funding_links":["https://tidelift.com/funding/github/maven/org.mockito:mockito-core","https://tidelift.com/subscription/pkg/maven-org-mockito-mockito-core","https://tidelift.com/subscription/pkg/maven-org-mockito-mockito-core?utm_source=maven-org-mockito-mockito-core\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo"],"categories":["HarmonyOS","Java","库","Mock","Library","项目","测试","Android Kotlin Project Showcase","四、测试与代码质量","dependency list","系统设计","IV. Testing","Projects","Mocking","Testing","Uncategorized","Solutions"],"sub_categories":["Windows Manager","测试","Helper","1. 测试框架","1. Testing","Testing","Spring Boot","Uncategorized"],"readme":"\u003ca href=\"https://site.mockito.org\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/mockito/mockito/main/config/javadoc/resources/org/mockito/logo.png\"\n     srcset=\"https://raw.githubusercontent.com/mockito/mockito/main/config/javadoc/resources/org/mockito/logo@2x.png 2x\"\n     alt=\"Mockito\" /\u003e\n\u003c/a\u003e\n\nMost popular mocking framework for Java\n\n[![CI](https://github.com/mockito/mockito/workflows/CI/badge.svg)](https://github.com/mockito/mockito/actions?query=workflow%3ACI)\n[![Coverage Status](https://img.shields.io/codecov/c/github/mockito/mockito.svg)](https://codecov.io/github/mockito/mockito)\n[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/mockito/mockito/blob/main/LICENSE)\n\n[![Release Notes](https://img.shields.io/badge/release%20notes-5.x-yellow.svg)](https://github.com/mockito/mockito/releases/)\n[![Maven Central](https://img.shields.io/maven-central/v/org.mockito/mockito-core.svg)](https://search.maven.org/artifact/org.mockito/mockito-core/)\n[![Javadoc](https://www.javadoc.io/badge/org.mockito/mockito-core.svg)](https://www.javadoc.io/doc/org.mockito/mockito-core)\n\n\n## Current version is 5.x\nStill on Mockito 1.x? See [what's new](https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2) in Mockito 2!\n[Mockito 3](https://github.com/mockito/mockito/releases/tag/v3.0.0) does not introduce any breaking API changes, but now requires Java 8 over Java 6 for Mockito 2.\n[Mockito 4](https://github.com/mockito/mockito/releases/tag/v4.0.0) removes deprecated API.\n[Mockito 5](https://github.com/mockito/mockito/releases/tag/v5.0.0) switches the default mockmaker to mockito-inline, and now requires Java 11.\nOnly one major version is supported at a time, and changes are not backported to older versions.\n\n## Mockito for enterprise\n\nAvailable as part of the [Tidelift](https://tidelift.com/subscription/pkg/maven-org-mockito-mockito-core) Subscription.\n\nThe maintainers of org.mockito:mockito-core and thousands of other packages are working with Tidelift to deliver\ncommercial support and maintenance for the open source dependencies you use to build your applications. Save time,\nreduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.\n[Learn more.](https://tidelift.com/subscription/pkg/maven-org-mockito-mockito-core?utm_source=maven-org-mockito-mockito-core\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo)\n\n## Development\n\nMockito publishes every change as a `-SNAPSHOT` version to a public Sonatype repository. Roughly once a month, we\npublish a new minor or patch version to Maven Central. For release automation we use\n[Shipkit library](http://shipkit.org), [Gradle Nexus Publish Plugin](https://github.com/gradle-nexus/publish-plugin).\nFully automated releases are awesome, and you should do that for your libraries, too!\nSee the [latest release notes](https://github.com/mockito/mockito/releases/)\nand [latest documentation](https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html). Docs in\njavadoc.io are available 24h after release. Read also\nabout [semantic versioning in Mockito](https://github.com/mockito/mockito/wiki/Semantic-Versioning).\n\nOlder 1.x and 2.x releases are available in\n[Central Repository](https://search.maven.org/artifact/org.mockito/mockito-core/1.10.19/jar)\nand [javadoc.io](https://javadoc.io/doc/org.mockito/mockito-core/1.10.19/org/mockito/Mockito.html) (documentation).\n\n## More information\n\nAll you want to know about Mockito is hosted at [The Mockito Site](https://site.mockito.org) which is [Open Source](https://github.com/mockito/mockito.github.io) and likes [pull requests](https://github.com/mockito/mockito.github.io/pulls), too.\n\nWant to contribute? Take a look at the [Contributing Guide](https://github.com/mockito/mockito/blob/main/.github/CONTRIBUTING.md).\n\nEnjoy Mockito!\n\n## Need help?\n\n* Search / Ask question on [stackoverflow](https://stackoverflow.com/questions/tagged/mockito)\n* Go to the [mockito mailing-list](https://groups.google.com/group/mockito) (moderated)\n* Open a ticket in GitHub [issue tracker](https://github.com/mockito/mockito/issues)\n\n## How to develop Mockito?\n\nTo build locally:\n\n```shell\n./gradlew build\n```\nYou can open in any IDE that support Gradle, e.g. IntelliJ IDEA, or Fleet.\nFor Eclipse, one may need to run `./gradlew eclipse` before importing the project.\n\n## How to release new version?\n\n1. Every change on the main development branch is released as `-SNAPSHOT` version to Sonatype snapshot repo\n   at https://s01.oss.sonatype.org/content/repositories/snapshots/org/mockito/mockito-core.\n2. To release a non-snapshot version to Maven Central push an annotated tag, for example:\n\n    ```shell\n    git tag -a -m \"Release 3.4.5\" v3.4.5\n    git push origin v3.4.5\n    ```\n\n3. At the moment, you **may not create releases from GitHub Web UI**. Doing so will make the CI build fail because the\n   CI creates the changelog and posts to GitHub releases. We'll support this in the future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockito%2Fmockito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmockito%2Fmockito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockito%2Fmockito/lists"}