vektra/mockery

A mock code autogenerator for Go

7,159

stars

1,377

commits

Go

primary language

Sep 15, 2026

updated

vektra.github.io/mockery/
generation
generator
go
golang
mock
mockgen
mocking
mocks
stretchr
testify
testing

README

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

Contributors

(top 30 of 147)

LandonTClipp

902 commits

evanphx

114 commits

RangelReale

23 commits

gaffo

13 commits

vektra/mockery

A mock code autogenerator for Go

7,159

stars

1,377

commits

Go

primary language

Sep 15, 2026

updated

vektra.github.io/mockery/
generation
generator
go
golang
mock
mockgen
mocking
mocks
stretchr
testify
testing

README

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

Contributors

(top 30 of 147)

LandonTClipp

902 commits

evanphx

114 commits

RangelReale

23 commits

gaffo

13 commits

Languages

Go

92.5%

templ

6.7%