vektra/mockery
A mock code autogenerator for Go observed · 2026-08-28
Health v2 · maintenance only
99/100
- Activity 99
- Release rhythm 99
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 7
- age_days: 4383
- days_rel: 10
- days_push: 10
- n_releases_24m: 60
Adoption not part of the score
7154 stars · 458 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
mockery is a CLI tool that auto-generates mock implementations for Go interfaces using the stretchr/testify/mock package. It eliminates the boilerplate of hand-writing mocks so developers can focus on writing tests.
Use cases
- generate mocks for Go interfaces
- remove boilerplate when writing Go unit tests
- create testify-based mocks automatically
- mock dependencies for Go testing
- replace hand-written mock implementations
- set up mocking in a Go project
When to choose
- you write Go code and use testify/mock for testing
- you have many interfaces and want mocks generated consistently
- you want a maintained, widely-adopted mock generator (7k+ stars)
When to avoid
- you use a different mocking style like gomock or hand-rolled stubs
- your project is not in Go
- you prefer runtime mocking over generated code
Facets
cli-tool · maturity active
mocking testing cli testing developer-tools go cli cross-platform mock-generator testify golang-interfaces boilerplate-removal code-generation command-line
2 sources
- readme: https://github.com/vektra/mockery · fetched 2026-08-28 · 68d43dda1a4d
- homepage: https://vektra.github.io/mockery/ · fetched 2026-08-29 · 36c6c3c2e4f9
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| vektra/mockery | main | 99 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem