vektra

    vektra/mockery

    A mock code autogenerator for Go

    testing
    generation
    generator
    go
    golang
    mock
    Go
    BSD-3-Clause
    7.2K stars
    467 forks
    7.2K GitHub watchers
    Updated Oct 31, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    5 releases in the last 90 days, the latest 3 days ago, with 152 contributors on GitHub.

    Gained 57% fewer stars in the last 90 days than in the 90 days before.

    Use Cases & Benefits

    • Generates mock implementations for Go interfaces to simplify testing.
    • Eliminates manual mock coding by automating mock creation using stretchr/testify/mock.
    • Use for automating mock generation in Go projects to speed up unit testing.
    • Use for integrating with testify-based test suites to improve test reliability.
    • Use for reducing boilerplate in large codebases with many interface dependencies.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    BSD 3-Clause

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present
    • Contributing guide: present
    • Code of conduct: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    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 is found at our GitHub Pages site.

    Excerpt from the vektra/mockery README on GitHub (BSD-3-Clause license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    467+11

    Open issues

    43-11

    Compared with peers in Testing

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    vektra/mockery compared with Testing repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    D4Vinci/Scrapling98.1K+6.9K651 day ago
    lexmount/moli22.7K+1.2K552 days ago
    tester-army/e2e13.3K+1.0K45today
    keploy/keploy19.5K+56445today
    usebruno/bruno48.2K+2815914 days ago
    vektra/mockery7.2K—653 days ago
    Category median22.7K+1.0K55—

    Discover Repositories

    Search across tracked repositories by name or description