GoMock is a mocking framework for the Go programming language. (by golang)

Gomock Alternatives

Similar projects and alternatives to gomock

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better gomock alternative or higher similarity.

Suggest an alternative to gomock

Reviews and mentions

Posts with mentions or reviews of gomock. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-23.
  • What mocking framework do you prefer?
    reddit.com/r/golang | 2021-10-23
    Gomock or mockery?
    reddit.com/r/golang | 2021-10-23
    I used to use Mockery, but it was unmaintained for a long time, and not that great, so these days it's Mock, which is nicer in several ways.
  • Mocking with High-Order Functions in Go
    reddit.com/r/golang | 2021-08-06
    Honestly curious - why wouldn't you use something like https://github.com/golang/mock to generate your mocks from an interface. Way more productive, consistent and cleaner. Spend more time and focus on your business logic rather than something that's already been solved.
  • Constructors: how to keep compatibility in a public API?
    reddit.com/r/golang | 2021-08-03
    Sorry for badly explaining. Issue explaining it better than me: https://github.com/golang/mock/issues/324
  • What are the most useful packages you know for Go?
    reddit.com/r/golang | 2021-07-25
    https://github.com/golang/mock - Auto generate mocks from interfaces for unit testing
  • Flexible mocking for testing in Go (without using a framework)
    reddit.com/r/golang | 2021-07-20
    BTW https://github.com/golang/mock is way more propular and does similar things.
  • My experience trying TDD for the first time in Go
    dev.to | 2021-05-27
    The first day, I wrote my tests for some GET routes. We use something called go-mock in our unit tests, which allows you to only focus on testing the function you're writing. Because of this, I found that you still needed to have a good idea of the code you want to write while writing out the tests. In our case, we needed to mock out our calls to an external API. If you asked for my opinion after the first day, I would've told you that I could envision the benefits of TDD for something like end to end testing, where it's a black box and you're only verifying that the output is what's expected from a given input. But for unit testing, it wasn't any different than just writing the code first.
  • Goreen tea : golang boilerplate for data-intensive microservice
    dev.to | 2021-05-11
    Unit testing with go-mock
  • Debugging Go Microservices in Kubernetes with VScode
    dev.to | 2021-04-09
    Sure, you can use unit tests with tools like GoMock and GoStub to simulate external dependencies or introduce synthetic data into the mix, but it still leaves you unsure if it will work with data from your actual services.
  • Part-2: Building a basic microservice with unidirectional-streaming gRPC using Golang
    dev.to | 2021-02-25
    To write the unit test we'll need to generate the mock of multiple interface as required. mockgen is the ready-to-go framework for mocking in Golang, so we'll be leveraging it in our unit tests.
  • Part-1: Building a basic microservice with gRPC using Golang
    dev.to | 2021-02-25
    As we are leveraging the golang/mock package, to install the package we need to run the following command:
  • Unit testing with external dependencies - Mocking type returned by library
    reddit.com/r/golang | 2021-02-02
    You can mock any interface with this: https://github.com/golang/mock
  • Perl - mockgen helper perl script
    dev.to | 2021-01-25
    Ref. golang/mock
  • Go, RabbitMQ and gRPC Clean Architecture microservice 💫👋
    dev.to | 2021-01-11
    Code for another gRPC methods and some tests you can find in th repository. For testing and mocking i can recomend testify and gomock.
  • Go gRPC Clean architecture microservice with Prometheus, Grafana monitoring and Jaeger opentracing ⚡️
    dev.to | 2020-12-27
    Every app must be covered by tests, I didn't completely cover all code this one, but wrote some test of course. For testing and mocking testify and gomock is very good tools.


Basic gomock repo stats
9 days ago

golang/mock is an open source project licensed under Apache License 2.0 which is an OSI approved license.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Find remote Go jobs at our new job board 99remotejobs.com. There are 7 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.