Testing / Mock

20 packages 1 resources

Packages (20)

mockery

Tool to generate Go interfaces.

7,119 454

go-sqlmock

Mock SQL driver for testing database interactions.

6,553 409

gomock

Mocking framework for the Go programming language.

3,355 167

hoverfly

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

2,495 226

moq

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

2,199 136

httpmock

Easy mocking of HTTP responses from external resources.

2,077 106

counterfeiter

Tool for generating self-contained mock objects.

1,133 100

go-txdb

Single transaction based database driver mainly for testing purposes.

751 47

minimock

Mock generator for Go interfaces.

750 49

pgxmock

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

585 69

xgo

A general pureposed function mocking library.

433 31

govcr

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

199 17

timex

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

71 5

mockhttp

Mock object for Go http.ResponseWriter.

23 6

mooncake

A simple way to generate mocks for multiple purposes.

18

mockfs

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

8

gomock

CLI tool to generate typed and framework-agnostic interface mocks, with support for generics.

6

connexions

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

genmock

Go mocking system with code generator for building calls of the interface methods.

Resources & Links (1)