Testing & Mocking Packages
Testing frameworks, assertion libraries, and mocking tools for writing reliable unit, integration, and end-to-end tests (testify, pytest, Vitest).
Packages in Testing & Mocking
Kind
Sort:Used by Most Apps
testify
The essential Go toolkit for assertions, mocks, and structured test suites.
pytest
The Python testing framework that makes writing small tests easy and scales to complex functional test suites.
go-cmp
A safer, more powerful alternative to reflect.DeepEqual for comparing Go values in tests.
testcontainers-go
Programmatically spin up disposable Docker containers for Go integration and smoke tests, then tear them down automatically.
go-sqlmock
A mock sql/driver implementation for Go that simulates database behavior in tests without a real database connection.
miniredis
A pure Go, in-memory Redis server for fast, dependency-free unit tests.
pluggy
The minimalist, production-ready plugin and hook system that powers pytest, tox, and devpi
Ginkgo
A mature, BDD-style testing framework for Go that pairs with Gomega to write expressive, parallelizable specs.
afero
A drop-in filesystem abstraction for Go that swaps OS, in-memory, archive, and cloud backends without touching your code.
Faker
A Python library that generates realistic fake data for testing, seeding, and anonymizing datasets across 70+ locales.
Gofakeit
A zero-dependency Go library with 310+ functions for generating random fake data, from single values to fully populated structs.
Dockertest
Spin up real Docker containers for Go integration tests, then tear them down automatically.
hypothesis
Property-based testing for Python that generates edge cases and shrinks failures to their simplest reproducing example.
fake-useragent
Up-to-date user-agent string faker backed by a real-world browser usage database, bundled offline.
gock
Versatile HTTP traffic mocking for Go, intercepting any net/http-based client for deterministic tests.
fakeredis
A pure-Python, in-memory implementation of the Redis protocol for testing.
pytest-order
Pytest plugin for running tests in a specific, controllable order
GoConvey
Behavior-driven testing for Go with nested specs, rich assertions, and a live browser results UI.
behave
A Python behavior-driven development framework that runs Gherkin feature files against step definitions written in plain Python.
testcontainers-python
Throwaway Docker containers for real integration tests, driven straight from Python.
pytest-html
A pytest plugin that turns your test run into an interactive, shareable HTML report.
mock
The rolling backport of Python's unittest.mock library
toxiproxy
A TCP proxy for injecting network and system failures to test how applications handle unreliable dependencies.
factory_boy
A versatile test fixtures replacement for Python, providing declarative factories for building complex test objects.