SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Go Mock Projects
Sql mock driver for golang to test database interactionsProject mention: How do you unit-test code that reaches out to the db, without introducing interfaces everywhere? | /r/golang | 2023-08-16
A mock code autogenerator for Go (by vektra)Project mention: go-ecommerce-microservices: A practical e-commerce microservices, built with cqrs, event sourcing, vertical slice architecture, event-driven architecture. | /r/golang | 2023-08-26
Some of the features: - ✅ Using Vertical Slice Architecture as a high level architecture - ✅ Using Event Driven Architecture on top of RabbitMQ Message Broker with a custom [Event Bus](pkg/messaging/bus/) - ✅ Using Event Sourcing in Audit Based services like [Orders Service](services/orders/) - ✅ Using CQRS Pattern and Mediator Patternon top of Go-MediatR library - ✅ Using Dependency Injection and Inversion of Controlon top of uber-go/fx library - ✅ Using RESTFul api with Echo framework and using swagger with swaggo/swag library - ✅ Using Postgres and EventStoreDB to write databases with fully supports transactions(ACID) - ✅ Using MongoDB and Elastic Search for read databases (NOSQL) - ✅ Using OpenTelemetry for collection Distributed Tracing with using Jaeger and Zipkin - ✅ Using OpenTelemetry for collection Metrics with using Prometheus and Grafana - ✅ Using Unit Test for testing small units with mocking dependent classes and using Mockery for mocking dependencies - ✅ Using End2End Test and Integration Test for testing features with all of their real dependeinces using docker containers (cleanup tests) and testcontainers-go library
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
Lightweight service virtualization/ API simulation / API mocking tool for developers and testersProject mention: We created WireMock, an API platform that is designed to improve developer productivity and enables developers and testers to Mock APIs in every stage of the API lifecycle | /r/golang | 2023-02-02
HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽Project mention: Testing calls to external APIs | /r/golang | 2022-12-09
Mocking the http client with explicit responses; for example using h2non/gock
HTTP mocking for GolangProject mention: Golang rest-api testing | /r/golang | 2022-12-27
A tool for generating self-contained, type-safe test doubles in goProject mention: Mocking database calls without a library? | /r/golang | 2023-02-07
then just replace whole function, don't generate manually the mock '__') or it would get out of hand fast, you can just use codegen that static typed like https://github.com/maxbrunsfeld/counterfeiter
Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
Mmock is an HTTP mocking application for testing and fast prototyping
Immutable transaction isolated sql driver for golangProject mention: Integration Tests with Postgres | /r/golang | 2023-03-29
3 years ago I created a internal library where I worked to setup the testing with the db's. One param was the schema directory and the other one was the path of the data insertion file. It worked really well but was a little slow. It was a little bit weird to configure the container to run the tests. As I would have to give access to go container that ran the unit tests access to docker. But back then I was running boot2docker and made things very cumbersome. I think with a local docker things would be way simpler. I ended up using and normal DB from the CI/CD and https://github.com/DATA-DOG/go-txdb If I had to do it again I might do an hybrid in-between the two solutions
gRPC Mock Server
Powerful mock generation tool for Go programming language
Simple way to generate mock servers written in Go
OpenAPI mock server with random data generation
Redis client Mock
Go Interface Mocking Tool
HTTP mock for Golang: record and replay HTTP/HTTPS interactions for offline testing
Mr. gomockhandler is the clever and more agile manager of golang/mock 👔
SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server.
A library to aid unittesting code that uses Golang's Github SDK
Go Wrapper for using localstack
A test-friendly replacement for golang's time package (by cabify)
Gadgeto! is a collection of tools that aim to facilitate the development of REST APIs in Go.Project mention: Replacement for loopfz/gadgeto (OpenAPI 3 generator) | /r/golang | 2023-12-05
I've been using wI2L/fizz with loopfz/gadgeto for autogenerating OpenAPI 3 documentation, but both libraries seem to have died down and there are many pull requests that haven't gotten any attention.
Official Keploy Go SDK 🔵 (by keploy)
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go Mock related posts
How do you unit-test code that reaches out to the db, without introducing interfaces everywhere?
1 project | /r/golang | 16 Aug 2023
Direction of mockery: absorb different styles of mocks into this project · vektra mockery · Discussion #671
1 project | /r/golang | 11 Jul 2023
Maintainership of Go’s official gomock repo has been transferred to Uber.
1 project | /r/golang | 10 Jul 2023
Uber Now Maintains Gomock
1 project | news.ycombinator.com | 4 Jul 2023
grpcmock: Mock gRPC servers dynamically
2 projects | /r/golang | 1 Jul 2023
Google Stopped Maintaining GoMock
2 projects | news.ycombinator.com | 28 Jun 2023
Go: Write Mock Test cases using Mockery and
1 project | dev.to | 10 May 2023
A note from our sponsor - #<SponsorshipServiceOld:0x00007f0f9b1376b0>
www.saashub.com | 6 Dec 2023
What are some of the best open-source Mock projects in Go? This list will help you: