Ross ROSS = Recommend OSS · open-source software intelligence for agents

Open-source mocking software

187 open-source libraries, tools and applications tagged mocking, ranked by how closely mocking is their primary purpose, then by adoption and maintenance health. Each entry links to a page with sources, use cases and when to choose or avoid it.

187 products, primary matches first, then adoption-weighted; health v2 shown.

ProductHealth v2StarsMaturity
jestjs/jest
Jest is a JavaScript testing framework that provides a complete and easy-to-use solution for unit, integration, and snapshot testing. It ru…
9845485active
google/googletest
GoogleTest is Google's C++ xUnit testing and mocking framework, merging the formerly separate GoogleTest and GoogleMock projects. It provid…
8539642stable
stretchr/testify
Testify is a Go library that provides a rich set of testing utilities, including easy-to-use assertions, mocking support, and test suite ma…
8726219active
Faker
Faker is a Python library that generates realistic fake data such as names, addresses, and text. It is commonly used to seed databases, cre…
9519447stable
Keploy
Keploy is a developer-centric API and integration testing platform that records real application traffic, database queries, and streaming e…
9618641active
Mock Service Worker
Mock Service Worker (MSW) is an API mocking library for JavaScript that intercepts HTTP, GraphQL, and WebSocket requests in browsers via th…
9518275stable
Jasmine
Jasmine is a behavior-driven development (BDD) testing framework for JavaScript that runs in browsers and Node.js. It provides a clean desc…
9115811stable
Faker
Faker is a TypeScript library for generating massive amounts of realistic fake data such as names, addresses, dates, and financial records …
9215518stable
Mockito
Mockito is the most popular mocking framework for unit tests written in Java, with a clean API for creating test doubles and verifying inte…
8215457stable
nock/nock
Nock is an HTTP server mocking and expectations library for Node.js. It intercepts HTTP requests made by code under test and returns predef…
9413126stable
mockery/mockery
Mockery is a flexible PHP mock object framework for creating test doubles in unit tests. It provides a human-readable DSL for defining expe…
9410725stable
Sinon.JS
Sinon.JS is a standalone, test framework agnostic JavaScript library providing test spies, stubs, mocks, and fake timers. It integrates sea…
669757stable
bchavez/Bogus
Bogus is a fake data generator library for .NET languages (C#, F#, VB.NET), ported from faker.js with a FluentValidation-inspired fluent AP…
549740active
karatelabs/karate
Karate is an open-source Java-based test automation framework that unifies API testing (REST, GraphQL, SOAP, WebSocket), UI browser automat…
998985active
getmoto/moto
Moto is a Python library that mocks AWS services so tests can run against simulated AWS infrastructure without real credentials or network …
998705active
Prophecy
Prophecy is a highly opinionated yet powerful and flexible PHP object mocking framework. Originally built for phpspec2, it works with any P…
748466stable
mockoon/mockoon
Mockoon is a free, open-source desktop application (built with Electron) for designing and running mock REST APIs locally, with a companion…
928416active
thoughtbot/factory_bot
factory_bot is a Ruby library for defining and building test data objects with a straightforward factory definition syntax. It supports mul…
838169stable
WireMock
WireMock is a popular open-source tool for mocking HTTP-based APIs, runnable as an embedded Java library, standalone server, or container. …
777388stable
vektra/mockery
mockery is a CLI tool that auto-generates mock implementations for Go interfaces using the stretchr/testify/mock package. It eliminates the…
967169active
hamcrest/hamcrest-php
The official PHP port of the Hamcrest matcher library, providing a fluent set of matchers for writing expressive assertions in tests. It fo…
736984stable
spf13/afero
Afero is a filesystem abstraction library for Go that provides a universal interface over multiple storage backends, including local disk, …
736707stable
orval-labs/orval
Orval is a code generation tool that produces type-safe TypeScript API clients from OpenAPI v3 or Swagger v2 specifications in YAML or JSON…
936473active
devlooped/moq
Moq is the most popular mocking framework for .NET, letting developers create mock objects from interfaces and classes using lambda express…
866412active
robolectric/robolectric
Robolectric is the industry-standard unit testing framework for Android that runs tests in a simulated Android environment inside a JVM, av…
886051active
mockk/mockk
MockK is a mocking library for Kotlin providing a Kotlin-first DSL for creating mocks, stubbing behavior, and verifying calls. It supports …
865761active
ardatan/graphql-tools
GraphQL Tools is a TypeScript/JavaScript utility library for building, manipulating, mocking, and stitching GraphQL schemas using an SDL-fi…
945429active
dubzzz/fast-check
fast-check is a property-based testing framework for JavaScript and TypeScript, inspired by QuickCheck. It automatically generates test inp…
985193active
stoplightio/prism
Prism is an open-source CLI tool that turns OpenAPI v2/v3 documents or Postman Collections into a fully functional HTTP mock server with dy…
935043active
Mimesis
Mimesis is a Python library for generating fake but realistic data across 47 locales, covering names, addresses, dates, financial data, and…
984851stable
kotest/kotest
Kotest is a comprehensive, multiplatform testing framework for Kotlin offering a flexible test DSL, over 350 assertion matchers, and integr…
1004789active
spulec/freezegun
FreezeGun is a Python library that lets tests 'travel through time' by mocking datetime and time module functions. It provides a decorator …
474527stable
enzymejs/enzyme
Enzyme is a JavaScript testing utility for React that makes it easier to assert, manipulate, and traverse React Components' output. Its API…
5019806maintenance
dreamhead/moco
Moco is an easy-setup stub framework for the JVM that spins up mock HTTP, REST, WebSocket, and SSE servers from simple JSON configuration f…
674444active
getsentry/responses
A Python library for mocking out the `requests` HTTP library in tests. It lets you register fake responses with matching on method, URL, he…
924342active
bblimke/webmock
WebMock is a Ruby library for stubbing HTTP requests and setting expectations on them at the HTTP client library level. It works with many …
994050stable
thomhurst/TUnit
TUnit is a modern, fast .NET testing framework built on Microsoft.Testing.Platform that discovers tests at compile time via Roslyn source g…
903979active
FactoryBoy/factory_boy
factory_boy is a Python test fixtures replacement inspired by Ruby's factory_bot. It lets developers define declarative factories for creat…
563811stable
Spock
Spock is a testing and specification framework for JVM developers that combines BDD-style readable specifications with powerful built-in mo…
713629active
alicebob/miniredis
Miniredis is a pure Go implementation of (parts of) the Redis server designed for use in Go unit tests. It runs an in-memory Redis server w…
873623stable
AutoFixture/AutoFixture
AutoFixture is an open-source .NET library that automates the creation of test data and object graphs, minimizing the 'Arrange' phase of un…
813540stable
ctimmerm/axios-mock-adapter
An axios adapter that intercepts and mocks HTTP requests made with the axios client. It lets developers define canned responses, delays, ne…
493540stable
json-schema-faker/json-schema-faker
A JavaScript library that generates valid, realistic fake JSON data from JSON Schema definitions, supporting JSON Schema 2019-09 and 2020-1…
863447active
travisjeffery/timecop
Timecop is a Ruby gem that provides time travel, time freezing, and time acceleration capabilities for testing time-dependent code. It offe…
753426stable
callstack/react-native-testing-library
React Native Testing Library is a TypeScript library providing simple and complete testing utilities for React Native components, built on …
983420active
uber-go/mock
GoMock (go.uber.org/mock) is a mocking framework for Go that generates mock implementations of interfaces via the mockgen code-generation t…
693416active
pester/Pester
Pester is the ubiquitous test and mock framework for PowerShell, providing a Describe/Context/It DSL with Should assertions and powerful co…
963346active
thoughtbot/factory_bot_rails
factory_bot_rails provides Rails integration for Factory Bot, a fixtures replacement library for defining test data with a straightforward …
643139stable
rewire
rewire is a Node.js library that adds special setter and getter methods to CommonJS modules so tests can inject mocks, override private var…
513089active
kevin1024/vcrpy
VCR.py is a Python library that records HTTP interactions to cassette files and replays them in later test runs, eliminating real network t…
943020active
nsubstitute/NSubstitute
NSubstitute is a mocking library for .NET that generates substitute instances for interfaces and virtual members with a succinct, natural s…
942978stable
typegoose/mongodb-memory-server
A Node.js library that programmatically downloads and spins up real MongoDB server binaries for testing, holding data in memory with zero o…
972852active
Netflix/pollyjs
Polly.JS is a standalone, framework-agnostic JavaScript library for recording, replaying, and stubbing HTTP interactions in both Node and t…
3910249maintenance
google/jimfs
Jimfs is an in-memory file system for Java 8+ that implements the java.nio.file abstract file system APIs. It lets code create and use virt…
852563stable
SpectoLabs/hoverfly
Hoverfly is a lightweight open-source API simulation and service virtualization tool written in Go. It captures HTTP/HTTPS traffic and repl…
972524active
symfony/phpunit-bridge
A Symfony component providing utilities for PHPUnit, most notably management and reporting of user deprecation notices. It also offers Cloc…
962463stable
tapjs
Node-tap is a Test-Anything-Protocol (TAP) test framework for JavaScript and TypeScript, providing a test runner CLI, assertion library, sn…
942426active
oguimbal/pg-mem
pg-mem is an in-memory emulation of a PostgreSQL database written in TypeScript, usable in Node.js or the browser. It lets you run SQL quer…
502368active
testing-library/user-event
user-event is a companion library for Testing Library that simulates real user interactions with the DOM by dispatching the full sequence o…
942331active
agiledragon/gomonkey
gomonkey is a Go library that makes monkey patching in unit tests easy, allowing functions, member methods, interfaces, function variables,…
882265active
h2non/gock
gock is a Go library for declarative HTTP traffic mocking that intercepts outgoing requests via http.RoundTripper and matches them against …
232215stable
matryer/moq
Moq is a Go code generation tool that creates mock structs from any Go interface for use in unit tests. It integrates with go generate and …
812207active
erikdoe/ocmock
OCMock is an Objective-C implementation of mock objects for unit testing, supporting stubs, dynamic mocks, partial mocks, and strict expect…
232165stable
mountebank-testing/mountebank
Mountebank is an open-source service virtualization tool that creates over-the-wire test doubles for many protocols including HTTP, TCP, gR…
792105active
jakerella/jquery-mockjax
A jQuery plugin that mocks and simulates ajax requests and responses so front-end code can be tested without a live server. It intercepts $…
872084stable
jarcoal/httpmock
httpmock is a Go library for easily mocking HTTP responses from external resources in tests. It lets you register responders for exact URLs…
832078stable
pytest-dev/pytest-mock
A pytest plugin that provides a `mocker` fixture wrapping the mock package's patching API. It automatically undoes mocks after each test an…
732041stable
linkedin/dexmaker
Dexmaker is a Java API for compile-time or runtime code generation targeting Android's Dalvik VM, producing .dex files instead of .class fi…
641967stable
phpspec
phpspec is a SpecBDD (Specification-based Behavior-Driven Development) testing framework for PHP. It guides developers to design and specif…
881902active
FakeItEasy/FakeItEasy
FakeItEasy is a .NET dynamic fake library for creating fake objects, mocks, and stubs in tests. It provides a fluent, context-aware API whe…
851856active
asomers/mockall
Mockall is a mock object library for Rust that generates mock implementations of traits and structs via procedural macros for use in unit t…
751846stable
datafaker-net/datafaker
Datafaker is a JVM library for generating fake data in Java, Kotlin, and Groovy, offering 250+ data providers covering names, addresses, da…
901803active
richardszalay/mockhttp
A testing library for .NET that replaces HttpClient's HttpMessageHandler with a mock handler, letting you configure canned responses via a …
801762active
DATA-DOG/go-sqlmock
go-sqlmock is a mock library implementing Go's sql/driver interface to simulate SQL driver behavior in tests without a real database connec…
606570maintenance
Brightify/Cuckoo
Cuckoo is a boilerplate-free mocking framework for Swift, using a compile-time code generator (Cuckoonator/build plugin) to create mock cla…
881745active
ivaylokenov/MyTested.AspNetCore.Mvc
MyTested.AspNetCore.Mvc is a strongly-typed fluent unit testing library for ASP.NET Core MVC and API applications. It provides over 500 ass…
871710active
wiremock/WireMock.Net
WireMock.Net is a flexible .NET library for stubbing and mocking HTTP responses with advanced request matching and response templating, bas…
931679active
vcr/vcr
VCR is a Ruby library that records your test suite's real HTTP interactions into 'cassette' files and replays them on subsequent runs. It i…
646078maintenance
lunarmodules/busted
busted is an elegant, easy-to-use unit testing framework for Lua (5.1+, LuaJIT, Moonscript, Terra) with a natural, readable spec style. It …
701642active
TestableIO/System.IO.Abstractions
A .NET library providing an injectable abstraction (IFileSystem) over System.IO so file access code can be tested. It mirrors the System.IO…
991627active
jenkinsci/JenkinsPipelineUnit
JenkinsPipelineUnit is a Groovy testing framework for unit testing Jenkins pipelines written in the Pipeline DSL. It provides a mock execut…
861586active
litestar-org/polyfactory
Polyfactory is a Python library that generates mock data from type hints, supporting frameworks like Pydantic, dataclasses, TypedDict, attr…
1001516active
cpputest/cpputest
CppUTest is a C/C++ xUnit-style unit testing and mocking framework, written in C++ but usable from both C and C++ projects. It is designed …
621483stable
testing-library/react-hooks-testing-library
A Testing Library utility for testing React custom hooks by rendering them inside a test harness function component, with utilities like re…
235258maintenance
atoum/atoum
atoum is a modern, standalone unit testing framework for PHP, distributed as a single PHAR archive. It offers fluent, natural-language-styl…
101441active
bovigo/vfsStream
vfsStream is a PHP stream wrapper that provides a virtual file system in memory, primarily for mocking the real file system in unit tests. …
231440stable
AliSoftware/OHHTTPStubs
OHHTTPStubs is an Objective-C/Swift library for stubbing network requests in iOS and macOS apps. It intercepts requests made through Cocoa'…
235066maintenance
dashbitco/mox
Mox is an Elixir library for defining concurrent mocks based on explicit behaviours (contracts). It enforces strict mocking principles so t…
751400stable
dnaeon/go-vcr
A Go library inspired by Ruby's VCR that records HTTP interactions to YAML cassettes and replays them in future test runs. It enables fast,…
841397active
shellspec/shellspec
ShellSpec is a full-featured BDD unit testing framework for shell scripts, supporting bash, ksh, zsh, dash, and all POSIX shells. It provid…
431396stable
3lvis/Networking
Networking is a Swift HTTP networking library built on URLSession with a simple, singleton-free API. It offers built-in request stubbing/mo…
801377active
eranpeer/FakeIt
FakeIt is a header-only C++ mocking framework with an expressive C++11-based API for creating mock objects and verifying method invocations…
631371stable
ihsanbal/LoggingInterceptor
An OkHttp interceptor library that provides pretty, configurable logging of HTTP requests and responses, with support for custom log levels…
571362active
fetch-mock
fetch-mock is a JavaScript library for mocking HTTP requests made with the fetch API, with an intuitive API for routing mocks based on requ…
801309active
bUnit-dev/bUnit
bUnit is a C# testing library for Blazor components that lets tests run like regular unit tests on top of xUnit, NUnit, MSTest, and TUnit. …
961304active
freerange/mocha
Mocha is a Ruby library for mocking and stubbing in unit tests, providing a unified syntax for full and partial mocking of test doubles. It…
751284stable
GdUnit4
GdUnit4 is an embedded unit testing framework for the Godot 4 game engine, supporting tests written in both GDScript and C#. It integrates …
991264active
go-testfixtures/testfixtures
A Go library that mimics Ruby on Rails-style test fixtures, loading YAML fixture files into a real SQL database before each test. It wipes …
761238active
hexclave/pgmock
pgmock is an in-memory PostgreSQL mock server for unit and E2E tests that runs entirely in WebAssembly on Node.js and in the browser, with …
461231active
php-vcr
PHP-VCR is a PHP port of Ruby's VCR library that records a test suite's HTTP interactions to cassette files and replays them in future test…
931213active

page 1 / 2 next →