Go BSD-3-Clause

mockery

A mock code autogenerator for Go

V

vektra

Dernière activité 15 sept. 2026
vektra/mockery

7,2 k

étoiles

459

forks

50

issues ouvertes

generationgeneratorgogolangmockmockgenmockingmocksstretchrtestifytesting

Ce README est souvent en anglais.

mockery

go.dev reference GitHub go.mod Go version GitHub release (latest SemVer) Go Report Card codecov

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

Stargazers over time

Projets similaires

Interface mocking tool for go generate

Gocodegengolangmocking
Mmatryer
2,2 k étoiles136

A simple and easy-to-use Go mocking library derived from ByteDance's internal best practices

Gogolangmocktest
Bbytedance
907 étoiles48

A toolkit with common assertions and mocks that plays nicely with the standard library

Goassertionsgogolang
Sstretchr
26,2 k étoiles1,9 k