How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.
GoMock is a mocking framework for the Go programming language.
The main features of golang/mock are: Go Mocking Libraries, Stub and Record Patterns, Mock Argument Matchers, Mock Implementations, Interaction Expectations, Mock Call Order Verifications, Behavior Verification, Mock Behavior Configuration.
Open-source alternatives to golang/mock include: data-dog/go-sqlmock — go-sqlmock is a Go library that simulates SQL driver behavior for unit testing by intercepting database calls through… mockk/mockk — MockK is a Kotlin test double framework that creates mocks, spies, and relaxed mocks for unit testing, with support… devlooped/moq — Moq is a .NET mocking framework and C# library used to create simulated objects and interfaces. Its primary purpose is… h2non/gock — HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽. jarcoal/httpmock — HTTP mocking for Golang. moq/moq4 — Moq4 is a .NET mocking framework used to create simulated implementations of interfaces and abstract classes. It…
go-sqlmock is a Go library that simulates SQL driver behavior for unit testing by intercepting database calls through the standard database/sql/driver interface, eliminating the need for a real database connection. It provides a comprehensive mocking framework that allows developers to define expectations for SQL operations, including queries, executions, prepared statements, and transaction lifecycles, with precise control over the results and errors returned. The library distinguishes itself through its flexible matching and verification capabilities. It supports regex-based or exact SQL
MockK is a Kotlin test double framework that creates mocks, spies, and relaxed mocks for unit testing, with support for final classes, static methods, and coroutines. It functions as a bytecode instrumentation library that modifies compiled class files at load time to intercept constructors, final methods, and static functions without source changes, and also provides dedicated libraries for constructor mocking and coroutine mocking. The framework is designed specifically for Kotlin, handling Kotlin-specific constructs like extension functions, singletons, and suspend functions. MockK disting
Moq is a .NET mocking framework and C# library used to create simulated objects and interfaces. Its primary purpose is to isolate code from external dependencies during unit testing by providing a system for interface simulation and behavioral testing. The framework distinguishes itself through the use of functional specification queries and LINQ-based querying to create declarative mocks. It supports the simulation of complex scenarios, including the automatic generation of recursive mock hierarchies, the implementation of multiple interfaces within a single mock instance, and the ability to
HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽