Top 23 Go Mock Projects
GoMock is a mocking framework for the Go programming language. (by golang)Project mention: Dependency Injection in Golang | dev.to | 2022-01-20
If you want to write tests, DI also can help you! Sometimes you need mocks for tests (to be independent of some modules like logger in tests), you have to generate it! There is an amazing tool for this task in go - GoMock. When you describe only needed methods in DI interface, the GoMock generate mocks just for those methods - it is faster and more readable in practice, than hundreds methods in mocks.
Sql mock driver for golang to test database interactionsProject mention: [HELP] how to test this piece of code? | reddit.com/r/golang | 2021-12-29
There is a good lib for db tests https://github.com/DATA-DOG/go-sqlmock
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
A mock code autogenerator for Golang (by vektra)Project mention: How do you install commands using go.mod | reddit.com/r/golang | 2021-11-02
There are some packages in my project that are not used in the source code, but they're used as commands (i.e. https://github.com/vektra/mockery https://github.com/rubenv/sql-migrate).
Lightweight service virtualization/API simulation tool for developers and testers
HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽Project mention: Testing methods with HTTP calls? | reddit.com/r/golang | 2021-11-19
HTTP mocking for GolangProject mention: Best practices around mocking interfaces from external packages | reddit.com/r/golang | 2021-05-06
Alternatively, you could use an http mock library like https://github.com/jarcoal/httpmock, and override the urls the RealClient calls with a mock response in your tests.
A tool for generating self-contained, type-safe test doubles in goProject mention: Slack notification Github action | reddit.com/r/golang | 2021-08-06
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
Mmock is an HTTP mocking application for testing and fast prototyping
Powerful mock generation tool for Go programming language
Immutable transaction isolated sql driver for golang
Simple way to generate mock servers written in GoProject mention: How to integrate an external API into your PHP application🔥 | dev.to | 2021-08-10
I have used Killgrave and the result was really good. The best of all is that you can configure a mock API just using yml configurations files.
OpenAPI mock server with random data generationProject mention: Eskimo is a supercharged mocking server for developers and testers, that aims to abstract the complexities of coding a mock server into simple JSON configurations. | reddit.com/r/coolgithubprojects | 2022-01-01
HTTP mock for Golang: record and replay HTTP/HTTPS interactions for offline testing
A test-friendly replacement for golang's time package (by cabify)
Mr. gomockhandler is the clever and more agile manager of golang/mock 👔Project mention: more clever and faster management for gomock (sanposhiho/gomockhandler) | reddit.com/r/golang | 2021-08-19
Go Wrapper for using localstack
SMTP mock server written on Golang. Mimic any 📤 SMTP server behaviour for your test environment with fake SMTP server.
Mock object for Go http.ResponseWriter
A library to aid unittesting code that uses Golang's Github SDKProject mention: Building GitHub Apps with Golang | dev.to | 2022-01-17
So far we've been testing the app with localtunnel, which is nice for quick ad-hoc tests against live API, but it doesn't replace proper unit tests. To write unit tests for this app, we need to mock-out the API to avoid being dependent on the external service. To do so, we can use go-github-mock:
Golang HTTP client testing framework
A language agnostic HTTP mock server for quick stub testing
Library that make mocking of Go functions/methods easy (by pasdam)Project mention: Unit Testing in Golang | reddit.com/r/golang | 2021-02-01
mockcompose generates mocking implementation for Go classes, interfaces and functionsProject mention: mockcompose to generate mocking implementation for Go classes, interfaces and functions | reddit.com/r/golang | 2021-07-06
Part of reason that I went ahead to build mockcompose was for to improve test coverage of an existing project without major refactoring. Another reason is for completeness of a mocking tool to cover all possible aspects in unit-test scenarios that Go technically allows. It was meant to use it with Go best practices in mind.
Go Mock related posts
Dependency Injection in Golang
1 project | dev.to | 20 Jan 2022
[HELP] how to test this piece of code?
1 project | reddit.com/r/golang | 29 Dec 2021
What is the real USP of Go's interfaces when compared to those in Java or C#?
1 project | reddit.com/r/golang | 9 Dec 2021
[HELP] Testing SQL queries and functions that use SQL queries in Golang.
3 projects | reddit.com/r/golang | 1 Dec 2021
Testing methods with HTTP calls?
1 project | reddit.com/r/golang | 19 Nov 2021
Why go plugin addresses do not load with go binary
3 projects | reddit.com/r/golang | 31 Oct 2021
Gerando mocks de interfaces no go!
2 projects | dev.to | 10 Nov 2021
What are some of the best open-source Mock projects in Go? This list will help you:
Are you hiring? Post a new remote job listing for free.