Go Mock

Open-source Go projects categorized as Mock

Top 23 Go Mock Projects

  • go-sqlmock

    Sql mock driver for golang to test database interactions

    Project mention: How do you unit-test code that reaches out to the db, without introducing interfaces everywhere? | /r/golang | 2023-08-16
  • mockery

    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

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • hoverfly

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

  • gock

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

  • httpmock

    HTTP mocking for Golang

  • 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.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • Mmock

    Mmock is an HTTP mocking application for testing and fast prototyping

  • go-txdb

    Immutable transaction isolated sql driver for golang

    Project 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

  • 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.

  • 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.

  • 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

  • go-localstack

    Go Wrapper for using localstack

  • timex

    A test-friendly replacement for golang's time package [managed by soy-programador] (by cabify)

  • gadgeto

    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.

  • go-sdk

    Official Keploy Go SDK 🔵 (by keploy)

  • SaaSHub

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

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). The latest post mention was on 2024-01-25.

Go Mock related posts

Index

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

Project Stars
1 go-sqlmock 5,759
2 mockery 5,506
3 hoverfly 2,297
4 gock 2,002
5 httpmock 1,854
6 counterfeiter 912
7 service-pattern-go 775
8 Mmock 656
9 go-txdb 609
10 gripmock 602
11 minimock 545
12 killgrave 479
13 openapi-mock 460
14 redismock 248
15 charlatan 200
16 govcr 160
17 go-smtp-mock 109
18 gomockhandler 102
19 go-github-mock 89
20 go-localstack 74
21 timex 70
22 gadgeto 53
23 go-sdk 42
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com