Go Mock

Open-source Go projects categorized as Mock

Top 23 Go Mock Projects

  • mockery

    A mock code autogenerator for Go (by vektra)

    Project mention: I Write Tests in Go | news.ycombinator.com | 2024-04-10

    I'm far too lazy to write mocks by hand in go. You can generate a mock for a given interface with mockery https://github.com/vektra/mockery

  • CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  • go-sqlmock

    Sql mock driver for golang to test database interactions

    Project mention: Princípios SOLID em GoLang - Dependency Inversion Principle (DIP) | dev.to | 2024-08-03
  • hoverfly

    Lightweight service virtualization/ API simulation / API mocking tool for developers and testers

    Project mention: Stubbing HTTP communication in E2E test with Hoverfly | dev.to | 2024-11-06

    In order to support requests to HTTPS sites Hoverfly comes with a bundled SSL certificate. However, as this is a testing tool, this certificate is self-signed, and needs to be marked as "trusted" before the applications using the proxy will attempt to connect to secure sites.

  • gock

    HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽

  • httpmock

    HTTP mocking for Golang

    Project mention: Integration Tests in Go with Cucumber, Testcontainers, and HTTPMock | dev.to | 2024-09-11
  • counterfeiter

    A tool for generating self-contained, type-safe test doubles in go

  • service-pattern-go

    Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • Mmock

    Mmock is an HTTP mocking application for testing and fast prototyping

  • go-txdb

    Immutable transaction isolated sql driver for golang

  • gripmock

    gRPC Mock Server

  • minimock

    Powerful mock generation tool for Go programming language

  • killgrave

    Simple way to generate mock servers written in Go

  • openapi-mock

    OpenAPI mock server with random data generation

    Project mention: How to Automatically Consume RESTful APIs in Your Frontend | dev.to | 2024-01-25

    Since the OpenAPI can effectively describe our resources, we can reuse it to generate a dummy server that can be later used for development and testing purposes without bootstrapping any actual services. There some tools available that can help us with this task, such as Prism, OpenAPI Mock, OpenAPI Backend and the MSW library we have already seen.

  • xgo

    All-in-one go testing library (by xhd2015)

    Project mention: My last weeks GitHub contributions | dev.to | 2024-04-27
  • redismock

    Redis client Mock

  • charlatan

    Go Interface Mocking Tool

  • govcr

    HTTP mock for Golang: record and replay HTTP/HTTPS interactions for offline testing

  • go-smtp-mock

    SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server.

  • wiretap

    The world's coolest API Validation and compliance tool. Validate APIs against OpenAPI specifications and much more (by pb33f)

    Project mention: How to Build a Perfect API Description | dev.to | 2024-02-23

    If you cannot find something to integrate with your existing test suite, consider using Wiretap which can run as a proxy, and handle contract testing of the requests/responses that come through it in testing or staging environments.

  • gomockhandler

    Mr. gomockhandler is the clever and more agile manager of golang/mock (uber/mock) 👔

  • go-github-mock

    A library to aid unittesting code that uses Golang's Github SDK

  • fauxrpc

    Easily start a fake gRPC/gRPC-Web/Connect/REST server from protobufs

  • go-localstack

    Go Wrapper for using localstack

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go Mock discussion

Log in or Post with

Go Mock related posts

  • Stubbing HTTP communication in E2E test with Hoverfly

    1 project | dev.to | 6 Nov 2024
  • Integration Tests in Go with Cucumber, Testcontainers, and HTTPMock

    4 projects | dev.to | 11 Sep 2024
  • Princípios SOLID em GoLang - Dependency Inversion Principle (DIP)

    1 project | dev.to | 3 Aug 2024
  • Go mock

    3 projects | dev.to | 30 Jul 2024
  • I Write Tests in Go

    1 project | news.ycombinator.com | 10 Apr 2024
  • 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
  • A note from our sponsor - CodeRabbit
    coderabbit.ai | 11 Dec 2024
    Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR. Learn more →

Index

What are some of the best open-source Mock projects in Go? This list will help you:

Project Stars
1 mockery 6,191
2 go-sqlmock 6,166
3 hoverfly 2,364
4 gock 2,114
5 httpmock 1,947
6 counterfeiter 1,006
7 service-pattern-go 858
8 Mmock 680
9 go-txdb 672
10 gripmock 663
11 minimock 649
12 killgrave 523
13 openapi-mock 496
14 xgo 370
15 redismock 286
16 charlatan 203
17 govcr 177
18 go-smtp-mock 130
19 wiretap 125
20 gomockhandler 111
21 go-github-mock 104
22 fauxrpc 81
23 go-localstack 78

Sponsored
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai