Testing / Mock

20 packages 1 resources

Packages (20)

mockery

Tool to generate Go interfaces.

6,977 449

go-sqlmock

Mock SQL driver for testing database interactions.

6,517 405

gomock

Mocking framework for the Go programming language.

3,243 163

hoverfly

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

2,461 221

gock

Versatile HTTP mocking made easy.

2,216 110

moq

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

2,172 132

httpmock

Easy mocking of HTTP responses from external resources.

2,075 106

counterfeiter

Tool for generating self-contained mock objects.

1,116 100

minimock

Mock generator for Go interfaces.

744 47

go-txdb

Single transaction based database driver mainly for testing purposes.

741 48

pgxmock

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

559 67

xgo

A general pureposed function mocking library.

429 27

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)