stretchr

    stretchr/testify

    #222 this week

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

    testing
    assertions
    go
    golang
    mocking
    testify
    Go
    MIT
    26.2K stars
    1.9K forks
    26.2K GitHub watchers
    Updated Oct 9, 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.

    Ranks #222 of 2,841 repositories GStars tracks this week (top 8%).

    2 releases in the last 90 days, the latest 51 days ago, with 261 contributors on GitHub.

    Peaked at #42 in the weekly ranking the week of Jul 26, its best in the past year.

    Use Cases & Benefits

    • Provides a Go testing toolkit with easy assertions, mocking, and test suite management to improve test code quality and readability.
    • Integrates seamlessly with Go's standard testing library while offering enhanced assertion messages and mock object support.
    • Use for writing clear and concise unit tests with expressive assertions in Go projects.
    • Use for creating mock implementations of interfaces to isolate and test components independently.
    • Use for organizing tests into suites with setup and teardown capabilities for structured and maintainable test code.

    Should you depend on it?

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

    License

    MIT

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

    Community files

    • README: present
    • Contributing guide: present

    Watch-outs

    No watch-outs from GStars' checks.

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

    From the README

    Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend.

    The assert package provides some helpful methods that allow you to write better test code in Go.

    The require package provides same global functions as the assert package, but instead of returning a boolean result they terminate current test. These functions must be called from the goroutine running the test or benchmark function, not from other goroutines created during the test. Otherwise race conditions may occur.

    See t.FailNow for details.

    Excerpt from the stretchr/testify README on GitHub (MIT 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

    Jul 16: -85Jul 17: -11Jul 18: +1Jul 27: +4Jul 31: -1Aug 3: +1Aug 20: +7

    +54 stars over 90 days across 17 snapshot days; best day +7 on Aug 20.

    Forks

    1.9K+44

    Open issues

    396+32

    Compared with peers in Testing

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

    stretchr/testify compared with Testing repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    tester-army/e2e10.1K+6.6K751 day ago
    D4Vinci/Scrapling87.3K+1.2K7551 days ago
    AtomicBot-ai/atomic-agent3.3K+67135today
    stretchr/testify26.2K+07551 days ago
    miuuyy/codex-chatgpt-web14.2K+075today
    vogler/free-games-claimer4.2K+075511 days ago
    Category median10.1K+67175—

    Discover Repositories

    Search across tracked repositories by name or description