# stretchr/testify

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

Repository: https://github.com/stretchr/testify
Canonical: https://ross.abutalabs.com/products/testify
Homepage: https://pkg.go.dev/github.com/stretchr/testify
Language: Go
License: MIT
License Family: permissive
Topics: testify, go, assertions, mocking, golang, testing, toolkit
Last push: 2026-08-24T10:23:06+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 5069, "days_push": 9, "days_rel": 14, "gap_med": 138.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 26185, forks 1914 (observed 2026-08-28T04:11:38.859914+00:00)

## What it is
Testify is a Go toolkit providing assertion helpers, mocking, and test suite interfaces that integrate with the standard library's testing package. It is the de facto standard testing companion library for Go.

## Use cases
- assert values in go tests with readable failure messages
- mock interfaces and verify method calls in go
- run setup and teardown around go test suites
- write table-driven tests with expressive assertions
- replace verbose if-based error checks in go tests

## When to choose
- you write Go tests and want readable assertions beyond the standard library
- you need lightweight mocking without code generation
- you want structured test suites with setup/teardown hooks

## When to avoid
- you prefer stdlib-only testing with no external dependencies
- you need parallel test execution in suites (suite package does not support it)
- you want a v2 with new features - this repo is frozen at v1 with no breaking changes

## Facets
- artifact type: library
- maturity: stable
- function: testing, mocking
- domain: testing, developer-tools, programming-languages
- platform: go, cross-platform
- tags: assertions, test-suites, tdd, go-testing

## Member repositories
- stretchr/testify (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:38.859914+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:55:55.419955+00:00, confidence not recorded.
  - readme: https://github.com/stretchr/testify (fetched 2026-08-28T04:11:38.859914+00:00, sha 4e54fe34ddd7)
  - homepage: https://pkg.go.dev/github.com/stretchr/testify (fetched 2026-08-29T07:52:24.661526+00:00, sha 0cc075661925)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T07:52:24.671287+00:00, sha 757852027879)
  - site_page: https://pkg.go.dev/github.com/stretchr/testify/suite (fetched 2026-08-29T07:52:24.675579+00:00, sha b644380b7454)
  - site_page: https://pkg.go.dev/github.com/stretchr/testify/mock (fetched 2026-08-29T07:52:24.673469+00:00, sha e25e96ba9f5c)
  - site_page: https://go.dev/project (fetched 2026-08-29T07:52:24.677629+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
