SaaSHub helps you find the best software and product alternatives Learn more →
Top 15 Go Mocking Projects
-
Testify simplifies writing unit tests in Go. The standard testing package is fine, but Testify adds assertions, mocking, and suite support, making tests more readable and maintainable.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
-
hoverfly
Lightweight service virtualization/ API simulation / API mocking tool for developers and testers
Hoverfly: A lightweight service virtualization tool specializing in API simulation and traffic capture for realistic mocks. It's particularly useful for cloud-native applications and supports CI/CD integration.
-
Another great option is gock, a lib that is also inspired by nock, with a simple and easy API. It works by intercepting any HTTP request made by any http.Client and adding it to a list, so it can check if a mock request exists. If not, an error is returned, unless the real networking mode is on. In that case, the request is done normally.
-
-
apitest
A simple and extensible behavioural testing library for Go. You can use api test to simplify REST API, HTTP handler and e2e tests.
At last, the apitest is a lib inspired by gock that has an infinity matchers and features. It also allows the user to build a sequence diagram of its HTTP calls. A cool thing is their excellent website with a lot of examples.
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
mocha is a lib inspired by nock and WireMock. It allows checking if the mock was called or not, which is a nice feature. Like httptest, it also it don't automatically intercept the requests.
-
-
-
-
-
Project mention: Show HN: Testify mock without the boilerplate (Golang) | news.ycombinator.com | 2025-01-01
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go Mocking discussion
Go Mocking related posts
-
How to Implement Mock APIs for API Testing
-
The best way for testing outbound API calls
-
Testando chamadas para APIs da melhor forma
-
I Write Tests in Go
-
Direction of mockery: absorb different styles of mocks into this project · vektra mockery · Discussion #671
-
vektra/mockery has fully released the "packages" feature! This blog explains what it is and how it works.
-
Why elixir over Golang
-
A note from our sponsor - SaaSHub
www.saashub.com | 18 Jun 2025
Index
What are some of the best open-source Mocking projects in Go? This list will help you:
# | Project | Stars |
---|---|---|
1 | Testify | 24,723 |
2 | mockery | 6,621 |
3 | hoverfly | 2,414 |
4 | gock | 2,172 |
5 | moq | 2,093 |
6 | apitest | 821 |
7 | vfs for golang | 475 |
8 | go-github-mock | 120 |
9 | mocha | 49 |
10 | go-sdk | 45 |
11 | mockc | 33 |
12 | mockcompose | 16 |
13 | mockitout | 11 |
14 | mock | 10 |
15 | gokka | 3 |