stretchr

    stretchr/testify

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

    26.2K stars
    1.9K forks
    26.2K GitHub watchers
    Updated Nov 5, 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.

    2 releases in the last 90 days, the latest 78 days ago, with 260 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

    Aug 20: +7

    +88 stars over 83 days across 8 snapshot days; best day +7 on Aug 20.

    Forks

    1.9K-39

    Open issues

    408+44

    Compared with peers in Testing

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, 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
    D4Vinci/Scrapling101.1K+6.3K756 days ago
    nrwl/nx29.4K—653 days ago
    stretchr/testify26.2K—5678 days ago
    gildas-lormeau/SingleFile22.9K—35today
    appium/appium22.2K—601 day ago
    cross-rs/cross8.4K—45—
    Category median22.9K—60—

    Discover Repositories

    Search across tracked repositories by name or description