Testing / Mock

20 packages 1 resources

Packages (20)

mockery

Tool to generate Go interfaces.

7,027 451

go-sqlmock

Mock SQL driver for testing database interactions.

6,532 405

gomock

Mocking framework for the Go programming language.

3,292 163

hoverfly

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

2,470 222

gock

Versatile HTTP mocking made easy.

2,215 109

moq

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

2,190 134

httpmock

Easy mocking of HTTP responses from external resources.

2,076 105

counterfeiter

Tool for generating self-contained mock objects.

1,124 101

go-txdb

Single transaction based database driver mainly for testing purposes.

748 48

minimock

Mock generator for Go interfaces.

747 49

pgxmock

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

570 68

xgo

A general pureposed function mocking library.

431 30

govcr

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

196 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`.

7

connexions

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

3

genmock

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

Resources & Links (1)