30 open-source projects similar to devlooped/moq, ranked by how many features they have in common. Compare stars, activity and what each one does to find the best Moq alternative.
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
Moq4 is a .NET mocking framework used to create simulated implementations of interfaces and abstract classes. It serves as a test double generator and behavior verification tool, allowing developers to isolate code during unit testing by replacing real dependencies with programmed mocks. The framework enables the definition of expected method behaviors and return values to control the execution flow of tests. It provides specialized capabilities for simulating methods that use output or reference parameters and mechanisms to monitor and trigger events on simulated objects. The library includ
GoMock is a mocking framework for the Go programming language.
Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit testing. It provides a collection of spies, stubs, and mocks that replace real function implementations and object methods with controlled substitutes. The project includes a specialized fake timer library for overriding the system clock, allowing the simulation of time progression to trigger timeouts and intervals without waiting for real-time delays. It also features a test sandbox mechanism to group multiple fakes together, ensuring the original state is restored between tes
Mockery is a PHP framework designed for creating test doubles, stubs, and spies to facilitate isolated unit testing. It serves as a utility for simulating class behavior, intercepting method calls, and validating arguments, allowing developers to replace real dependencies with mock objects to verify that code components interact as intended. The framework distinguishes itself through advanced capabilities for handling complex testing scenarios, such as bypassing constructors, mocking protected methods, and intercepting static calls or internal object instantiations. It provides a fluent inter
TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP
BATS is a testing framework and verification tool designed for Bash scripts and Unix programs. It serves as a test runner that validates the behavior of command line utilities by verifying exit statuses and command output. The framework functions as a TAP compliant test runner, producing output that follows the Test Anything Protocol for integration with reporting tools and continuous integration pipelines. The tool provides test automation capabilities including isolated test execution in separate subprocesses and lifecycle management via setup and teardown functions. It covers result aggre
Prophecy is a PHP mocking framework and test double library used to simulate object dependencies during unit testing. It serves as a behavioral testing tool for creating mocks, stubs, and dummies to isolate code and ensure predictable test results. The framework enables interaction verification by tracking method call counts and arguments to validate that specific interactions occurred. It supports defining specific return values or custom logic for method calls to simulate various execution scenarios. The library provides capabilities for argument matching based on type or value, interactio
xunit is a unit testing framework for the .NET ecosystem designed to execute isolated code units and report failures across multiple platforms. It functions as a data-driven test runner and a native AOT test suite, capable of verifying compiled binaries and standalone executables after ahead-of-time compilation. The framework utilizes build-time source generators for test discovery to define test cases without relying on runtime reflection. It also features an extensible reporting system where custom logic can be linked into test assemblies to output results in specialized formats. The proje
Kiwi is a behavior-driven development framework and specification library for iOS. It functions as a wrapper for XCTest, allowing developers to define and execute software requirements as automated tests to verify application logic. The framework utilizes a domain-specific language to organize test cases into a nested hierarchy of descriptions. It includes a mocking system that employs runtime message interception and dynamic proxies to record invocations and return stubbed values. The system provides a fluent assertion interface to evaluate object states and uses a block-based engine to exe
Mockito is a Java mocking framework and JUnit testing library used to create simulated objects and stub method calls to isolate components during unit tests. It functions as a dynamic proxy generator and bytecode instrumentation tool, allowing for the creation of runtime substitutes that mimic the behavior of real classes. The framework distinguishes itself by providing the ability to mock final classes and methods, bypassing standard language restrictions through bytecode modification. This capability enables the testing of legacy code that lacks interfaces. The toolset covers behavioral mo
This project is a comprehensive reference guide and cheat sheet for the Jest testing framework. It provides technical documentation and syntax examples for writing JavaScript unit tests, focusing on assertions, mocking strategies, and test suite configuration. The resource details specific methods for dependency isolation and mocking, including the use of fake timers, module-level substitutions, and function call verification. It also covers specialized workflows such as snapshot testing to detect regressions via serialized output comparisons. The guide further addresses asynchronous test pa
This project is a Chinese translation of a comprehensive guide to the Go programming language. It serves as a localized educational resource and technical manual designed to provide guidance on language syntax, design, and software development. The resource covers a broad range of Go language education, including the implementation of programming patterns and system design. It includes translated lessons and examples that focus on core language features such as concurrency and the use of interfaces. The content spans various capability areas, including language fundamentals, data modeling, r
Jasmine is a JavaScript testing framework and test runner designed for behavior-driven development. It provides a comprehensive toolset for writing and executing descriptive test suites that verify code behavior in both web browsers and Node.js environments. The framework is distinguished by its integrated mocking library, which allows for dependency isolation through spies and stubs, as well as the ability to simulate time and timing functions to test asynchronous logic synchronously. It also includes a mechanism to enforce test uniqueness, preventing duplicate names for tests and suites. I
Keploy is an automated testing platform that leverages kernel-level traffic interception to generate and maintain regression test suites for microservices. By capturing live network traffic and system calls via eBPF, the platform automatically creates deterministic test cases and mocks external dependencies without requiring manual code instrumentation. This approach allows developers to validate application behavior and API contracts by replaying production-like traffic in isolated environments. The platform distinguishes itself through its use of machine learning to perform test maintenance
Vitest is a high-performance testing framework designed for JavaScript and TypeScript applications. It provides an integrated environment that supports unit, integration, and browser-based testing, allowing developers to execute test suites natively without requiring separate build steps or complex configuration. The project distinguishes itself through a highly optimized execution model that leverages worker-thread isolation and on-demand module transformation to provide rapid feedback. It includes a comprehensive suite of mocking and spying utilities that allow for the interception of depen
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
This project is a mocking framework and library designed for creating simulated objects to isolate code and verify interactions during PHPUnit testing. It serves as a toolset for writing and running automated tests in PHP to ensure software correctness. The library replaces real object dependencies with controlled doubles to test specific code paths and simulate complex class behaviors. This enables the verification of logic within individual PHP classes by mocking the inputs and outputs of their collaborators. The framework provides capabilities for runtime object synthesis and interception
SwiftTips is a curated collection of guides, libraries, and design patterns focused on Swift language mastery, application architecture, and API design. It provides a technical resource for implementing advanced coding techniques and architectural best practices. The project emphasizes creating type-safe and conversational interfaces through strategic protocol composition and generics. It offers specialized patterns for building modular UI systems and managing complex view hierarchies, alongside comprehensive strategies for unit testing and dependency injection. The resource covers a broad s
PHPUnit is a unit testing framework and automated testing tool for the PHP ecosystem. It provides a comprehensive suite for writing and running automated tests to verify the functional correctness of PHP code and identify software bugs. The framework supports both unit and end-to-end testing to validate individual code units and complete application workflows. It includes capabilities for automated regression testing and test suite management, allowing for the execution of targeted subsets of tests. The tool provides mechanisms for identifying flaky tests through automatic retries and test r
Pester is a PowerShell testing framework and behavior-driven development tool used to write and run automated tests for scripts and modules. It defines and verifies software behavior through human-readable specifications to validate that code behaves as expected. The project includes a native mocking library that replaces real functions and commands with controlled implementations, allowing for the isolation of code and verification of command invocations without altering the system environment. It also functions as a code coverage tool that measures the percentage of executed lines during te
This project is a multi-protocol API simulation and mocking system designed to replace external dependencies during development and testing. It provides an API mocking server, a network traffic proxy, and specialized simulators for language model services and identity providers. The system distinguishes itself through deep AI simulation capabilities, including the emulation of language model providers and Model Context Protocol servers using JSON-RPC 2.0. It supports multi-turn conversational logic, state tracking for AI chat APIs, and the visualization of agent execution through call graphs
This project is a comprehensive guide and collection of best practices for testing Node.js backend applications. It provides a curated set of patterns and reference examples for writing reliable unit, integration, and component tests. The project distinguishes itself through specific strategies for backend integration, including detailed methods for API contract testing against OpenAPI specifications and shared schemas. It offers specialized guidance on managing message queue testing, focusing on idempotency, resilience, and asynchronous event synchronization. The guide covers a broad range
Jest is a JavaScript testing framework designed for writing and running automated test suites to verify the correctness of JavaScript and TypeScript code. It functions as a comprehensive toolset that integrates a test runner, a mocking and spying library, a snapshot testing tool, and a code coverage tool. The framework distinguishes itself through snapshot testing, which records the serialized state of data structures to detect regressions in future executions. It also includes a mocking and spying library for simulating external dependencies and tracking function calls to isolate code during
This is a dependency injection framework and inversion of control container for Python. It decouples object creation from business logic by managing how services and their dependencies are assembled, delivered, and linked within an application. The framework is distinguished by its ability to perform automated component wiring, using import hooks and decorators to inject dependencies into functions and classes across different modules. It supports non-blocking flows through an asynchronous dependency resolver and manages the initialization and shutdown sequences of shared external resources a
Bun is a high-performance runtime environment designed to execute JavaScript and TypeScript applications with minimal latency and high throughput. Built on a native core implemented in Zig, it provides a unified execution engine that leverages JavaScriptCore for efficient memory management and low-latency startup. The project functions as an all-in-one toolchain, integrating a native bundler, transpiler, package manager, and test runner into a single command-line interface. What distinguishes Bun is its focus on native system integration and developer productivity. It features a high-performa
This project is an educational platform and tutorial series designed to teach the Go programming language through the practice of test-driven development. It provides a structured path for developers to master language fundamentals, concurrency, and standard library usage by building functional applications in small, verifiable increments. The core methodology centers on the test-driven development cycle, where failing tests are written before implementation to define requirements and ensure code correctness. This approach is applied across a wide range of practical scenarios, including the c
This project is a collection of instructional resources and curriculum materials designed to teach the Java language. It provides a structured programming course, a fundamentals guide, and an object-oriented programming tutorial, supported by a series of practical coding exercises and implementation challenges. The curriculum focuses on implementing object-oriented patterns, including inheritance, polymorphism, and abstraction. It covers the creation of classes, the use of interfaces to define behavioral contracts, and the application of access modifiers to control data visibility. The educa
Python-Guide-CN is a Chinese translation of a comprehensive guide to idiomatic Python programming and software development. It serves as a curated programming tutorial and ecosystem reference, providing a structured path for learning Python syntax, standard libraries, and professional coding patterns. The project distinguishes itself by offering detailed instructions for setting up development environments across Windows, macOS, and Linux. It specifically focuses on the selection of interpreters and the management of virtual environments to ensure a consistent workspace. The guide covers a b
This project is an open-source software development kit and framework for implementing the Matter smart home standard. It provides a universal IPv6-based application layer and a cluster-based data model to ensure interoperability between diverse smart home devices and controllers. The system is distinguished by its multi-transport network abstraction, which maps Bluetooth LE, Thread, and Wi-Fi implementations to a common layer. It includes specialized tooling for secure device commissioning via QR codes and NFC, as well as a comprehensive over-the-air firmware update system for distributing s