Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mockery

> 测试质量
Open source

A mock code autogenerator for Go

7.2K stars0 likes2 views
WebsiteGitHub

About

A mock code autogenerator for Go

mockery

mockery provides the ability to easily generate mocks for Golang interfaces using the stretchr/testify/mock package. It removes the boilerplate coding required to use mocks.

Documentation

Documentation is found at our GitHub Pages site.

Development

taskfile.dev is used for build tasks. Initialize all go build tools:

go mod download -x

You can run any of the steps listed in Taskfile.yml:

$ task test
task: [test] go test -v -coverprofile=coverage.txt ./...

Stargazers

Issues· 50 open

View all issuesOpen on GitHub
  • #1082

    v3: adds unused import in matryer template with template.skip-ensure

    Updated Sep 10, 2026
  • #1182

    v2.53.7 release is incorrectly marked as latest

    buggood-first-issueNeeds InvestigationUpdated Sep 9, 2026
  • #1162

    Imports in mockery generated files do not comply with goimports standard when package name does not match directoryname

    Updated Jun 11, 2026
  • #1153

    Feature Request: A Wait() method for waiting for all expected calls

    Updated Apr 2, 2026
  • #1150

    Simplify embedded field access in generated mock constructors

    Updated Apr 1, 2026
  • #1119

    Reintroduce CLI args; make config file optional

    Updated Mar 25, 2026
  • #1108

    Dockerhub `latest` tag does not point to latest.

    Needs InvestigationUpdated Feb 17, 2026
  • #791

    Feature request: pre-commit hooks

    Updated Feb 6, 2026
  • #1132

    Add ability to customize `$constructorName` in testify template

    Updated Dec 18, 2025
  • #1130

    Otel TracerProvider Embedding hard to auto-mock.

    duplicateUpdated Dec 16, 2025

> Tags

Gogenerationgeneratorgogolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 22, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.