Go Mocking

Open-source Go projects categorized as Mocking

Top 14 Go Mocking Projects

  • Testify

    A toolkit with common assertions and mocks that plays nicely with the standard library

  • Project mention: Why I don't use a third-party assertion library in Go unit tests | dev.to | 2024-05-20

    Of course, as soon as people saw this, the third-party assertion helper libraries started appearing. The most popular one seems to be testify (although I've never used it). Personally, I thought that the explicit check would be good enough for me, but it's true that after writing a bunch of tests, the boilerplate does seem unnecessarily verbose.

  • 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

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

    InfluxDB logo
  • hoverfly

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

  • gock

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

  • moq

    Interface mocking tool for go generate (by matryer)

  • Project mention: vektra/mockery has fully released the "packages" feature! This blog explains what it is and how it works. | /r/golang | 2023-07-11
  • apitest

    A simple and extensible behavioural testing library for Go. You can use api test to simplify REST API, HTTP handler and e2e tests.

  • Project mention: Seeking API Ideas to Test the E2E Testing Framework | /r/golang | 2023-10-20

    Currently, I am developing an E2E testing framework called go-spectest/spectest. Spectest is a package forked from steinfletcher/apitest, and I have been gradually adding its unique features. To enhance spectest further, I believe it's best to actually test APIs.

  • vfs for golang

    Virtual filesystem library written in golang

  • SaaSHub

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

    SaaSHub logo
  • go-github-mock

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

  • go-sdk

    Official Keploy Go SDK 🔵 (by keploy)

  • mocha

    Build Mock APIs in Go (by vitorsalgado)

  • mockc

    Completely type-safe compile-time mock generator for Go

  • mockcompose

    mockcompose generates mocking implementation for Go classes, interfaces and functions

  • mockitout

    A language agnostic HTTP mock server for quick stub testing

  • gokka

    A small Go mocking library powered by Cue

  • 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 Mocking related posts

  • I Write Tests in Go

    1 project | news.ycombinator.com | 10 Apr 2024
  • Direction of mockery: absorb different styles of mocks into this project · vektra mockery · Discussion #671

    1 project | /r/golang | 11 Jul 2023
  • vektra/mockery has fully released the "packages" feature! This blog explains what it is and how it works.

    1 project | /r/golang | 11 Jul 2023
  • Why elixir over Golang

    10 projects | /r/elixir | 29 May 2023
  • Go: Write Mock Test cases using Mockery and

    1 project | dev.to | 10 May 2023
  • Mocking unexported interfaces?

    1 project | /r/golang | 28 Apr 2023
  • Is gomock still maintained and recommended?

    7 projects | /r/golang | 6 Mar 2023
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 20 May 2024
    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. Learn more →

Index

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

Project Stars
1 Testify 22,152
2 mockery 5,682
3 hoverfly 2,314
4 gock 2,030
5 moq 1,775
6 apitest 740
7 vfs for golang 463
8 go-github-mock 90
9 go-sdk 42
10 mocha 41
11 mockc 32
12 mockcompose 15
13 mockitout 11
14 gokka 3

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com