Cute Gopher Mascot

The Best Go Libraries For Testing - Mock (19)

Discover the best Go libraries for Testing in Mock! Find the perfect tools to streamline your development and boost productivity. From go-sqlmock to govcr, we've got you covered. Let the coding begin!

go-sqlmock

Mock SQL driver for testing database interactions

Discover More! 🚀

govcr

HTTP mock for Golang: record and replay HTTP interactions for offline testing

Discover More! 🚀

hoverfly

HTTP(S) proxy for recording and simulating REST/SOAP APIs with extensible middleware and easy-to-use CLI

Discover More! 🚀

httpmock

Easy mocking of HTTP responses from external resources

Discover More! 🚀

minimock

Mock generator for Go interfaces

Discover More! 🚀

mockery

Tool to generate Go interfaces

Discover More! 🚀

mockhttp

Mock object for Go http.ResponseWriter

Discover More! 🚀

connexions

Combine multiple APIs with meaningful responses, configurable latency and error codes based on OpenAPI 3.0 specifications and files

Discover More! 🚀

counterfeiter

Tool for generating self-contained mock objects

Discover More! 🚀

go-txdb

Single transaction based database driver mainly for testing purposes

Discover More! 🚀

gock

Versatile HTTP mocking made easy

Discover More! 🚀

gomock

Mocking framework for the Go programming language

Discover More! 🚀

mockfs

Mock filesystem for Go testing with error injection and latency simulation, built on `testing/fstest.MapFS`

Discover More! 🚀

moq

Utility that generates a struct from any interface. The struct can be used in test code as a mock of the interface

Discover More! 🚀

pgxmock

A mock library implementing [pgx - PostgreSQL Driver and Toolkit](https://github.com/jackc/pgx/)

Discover More! 🚀

timex

A test-friendly replacement for the native `time` package

Discover More! 🚀

xgo

A general pureposed function mocking library

Discover More! 🚀

mooncake

A simple way to generate mocks for multiple purposes

Discover More! 🚀

go-localstack

Tool for using localstack in AWS testing

Discover More! 🚀