Testing / Mock

20 packages 1 resources

Packages (20)

mockery

Tool to generate Go interfaces.

7,097 455

go-sqlmock

Mock SQL driver for testing database interactions.

6,544 406

gomock

Mocking framework for the Go programming language.

3,327 164

hoverfly

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

2,486 224

moq

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

2,200 135

httpmock

Easy mocking of HTTP responses from external resources.

2,076 105

counterfeiter

Tool for generating self-contained mock objects.

1,129 100

go-txdb

Single transaction based database driver mainly for testing purposes.

751 48

minimock

Mock generator for Go interfaces.

750 49

pgxmock

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

581 68

xgo

A general pureposed function mocking library.

432 30

govcr

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

198 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)