mockcompose to generate mocking implementation for Go classes, interfaces and functions

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • mockcompose

    mockcompose generates mocking implementation for Go classes, interfaces and functions

    As a Go newbie, the on-boarding process to Golang went relatively smoothly except a small glitch when it came to search for a mocking framework to test out a Go class implementation. I was a bit surprised to realize that I was not able to find a on-shelf tool to help me mock a class method. It might be an edge case scenario that I wanted to mock a class method, but I do believe that this is a valid use case, so I went ahead to spend a weekend building such a tool: mockcompose. It was originally aimed to just solve this one particular use case, therefore, it had to be used together with mockery (one of the great tools I found during my search in the period). I later refined the tool to cover mocking code generation for Go interfaces and functions, mockcompose can now be used in most of Go unit test scenarios. Please check it out and give it a try, I hope the tool is useful, feel free to drop your feedback and share with your opinion there.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • mockery

    A mock code autogenerator for Go (by vektra)

    As a Go newbie, the on-boarding process to Golang went relatively smoothly except a small glitch when it came to search for a mocking framework to test out a Go class implementation. I was a bit surprised to realize that I was not able to find a on-shelf tool to help me mock a class method. It might be an edge case scenario that I wanted to mock a class method, but I do believe that this is a valid use case, so I went ahead to spend a weekend building such a tool: mockcompose. It was originally aimed to just solve this one particular use case, therefore, it had to be used together with mockery (one of the great tools I found during my search in the period). I later refined the tool to cover mocking code generation for Go interfaces and functions, mockcompose can now be used in most of Go unit test scenarios. Please check it out and give it a try, I hope the tool is useful, feel free to drop your feedback and share with your opinion there.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

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
  • 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
  • vektra/mockery: v2.21.0 includes "packages" config section, allowing 5x faster mock generation and more fine-grained control over mocks

    1 project | /r/golang | 4 Mar 2023