SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Go Mock Projects
-
Project mention: How do you unit-test code that reaches out to the db, without introducing interfaces everywhere? | /r/golang | 2023-08-16
-
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
-
InfluxDB
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.
-
hoverfly
Lightweight service virtualization/ API simulation / API mocking tool for developers and testers
Project 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-02Use https://github.com/SpectoLabs/hoverfly
-
Mocking the http client with explicit responses; for example using h2non/gock
-
-
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
-
service-pattern-go
Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.
-
Onboard AI
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.
-
-
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
-
-
-
-
-
-
-
-
-
go-smtp-mock
SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server.
-
-
-
-
gadgeto
Gadgeto! is a collection of tools that aim to facilitate the development of REST APIs in Go.
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.
-
-
SaaSHub
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?
- Direction of mockery: absorb different styles of mocks into this project · vektra mockery · Discussion #671
- Maintainership of Go’s official gomock repo has been transferred to Uber.
- Uber Now Maintains Gomock
- grpcmock: Mock gRPC servers dynamically
- Google Stopped Maintaining GoMock
- Go: Write Mock Test cases using Mockery and
-
A note from our sponsor - #<SponsorshipServiceOld:0x00007f0f9b1376b0>
www.saashub.com | 6 Dec 2023
Index
What are some of the best open-source Mock projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | go-sqlmock | 5,580 |
2 | mockery | 5,259 |
3 | hoverfly | 2,274 |
4 | gock | 1,961 |
5 | httpmock | 1,791 |
6 | counterfeiter | 889 |
7 | service-pattern-go | 759 |
8 | Mmock | 651 |
9 | go-txdb | 585 |
10 | gripmock | 585 |
11 | minimock | 520 |
12 | killgrave | 455 |
13 | openapi-mock | 436 |
14 | redismock | 228 |
15 | charlatan | 199 |
16 | govcr | 161 |
17 | gomockhandler | 96 |
18 | go-smtp-mock | 93 |
19 | go-github-mock | 80 |
20 | go-localstack | 73 |
21 | timex | 70 |
22 | gadgeto | 45 |
23 | go-sdk | 39 |