function: mocking
185 products, primary matches first, then adoption-weighted; health v2 shown.
| Product | Health v2 | Stars | Maturity |
|---|---|---|---|
| jestjs/jest Jest is a comprehensive JavaScript testing framework with a focus on simplicity, working out of the box with Babel, TypeScript, Node, React… | 94 | 45474 | stable |
| google/googletest GoogleTest is Google's C++ xUnit testing and mocking framework, merging the formerly separate GoogleTest and GoogleMock projects. It provid… | 87 | 38962 | stable |
| stretchr/testify Testify is a Go toolkit providing assertion helpers, mocking, and test suite interfaces that integrate with the standard library's testing … | 90 | 26185 | stable |
| PHPUnit PHPUnit is the de facto unit testing framework for PHP, following the xUnit architecture. It provides a test runner, assertions, mocking, c… | 94 | 20045 | stable |
| joke2k/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… | 94 | 19380 | stable |
| keploy/keploy Keploy is a developer-centric API and integration testing platform that records real application traffic, database queries, and streaming e… | 95 | 18424 | active |
| mswjs/msw Mock Service Worker (MSW) is an API mocking library for JavaScript that intercepts HTTP, GraphQL, and WebSocket requests in browsers via th… | 90 | 18168 | stable |
| jasmine/jasmine Jasmine is a behavior-driven development (BDD) testing framework for JavaScript that runs in browsers and Node.js. It provides a clean desc… | 94 | 15823 | stable |
| faker-js/faker Faker is a TypeScript library for generating massive amounts of realistic fake data such as names, addresses, dates, and financial records … | 95 | 15474 | stable |
| 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… | 90 | 15448 | stable |
| 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… | 96 | 13121 | stable |
| 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… | 98 | 10724 | stable |
| sinonjs/sinon Sinon.JS is a standalone, test framework agnostic JavaScript library providing test spies, stubs, mocks, and fake timers. It integrates sea… | 66 | 9758 | stable |
| 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… | 61 | 9731 | active |
| karatelabs/karate Karate is an open-source Java-based test automation framework that unifies API testing (REST, GraphQL, SOAP, WebSocket), UI browser automat… | 99 | 8929 | active |
| getmoto/moto Moto is a Python library that mocks AWS services so tests can run against simulated AWS infrastructure without real credentials or network … | 99 | 8626 | active |
| phpspec/prophecy Prophecy is a highly opinionated yet powerful and flexible PHP object mocking framework. Originally built for phpspec2, it works with any P… | 80 | 8471 | stable |
| mockoon/mockoon Mockoon is a free, open-source desktop application (built with Electron) for designing and running mock REST APIs locally, with a companion… | 94 | 8379 | active |
| 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… | 89 | 8169 | stable |
| wiremock/wiremock WireMock is a popular open-source tool for mocking HTTP-based APIs, runnable as an embedded Java library, standalone server, or container. … | 80 | 7348 | stable |
| vektra/mockery mockery is a CLI tool that auto-generates mock implementations for Go interfaces using the stretchr/testify/mock package. It eliminates the… | 99 | 7154 | active |
| 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… | 80 | 6994 | stable |
| spf13/afero Afero is a filesystem abstraction library for Go that provides a universal interface over multiple storage backends, including local disk, … | 76 | 6692 | stable |
| devlooped/moq Moq is the most popular mocking framework for .NET, letting developers create mock objects from interfaces and classes using lambda express… | 78 | 6403 | active |
| 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… | 95 | 6396 | active |
| robolectric/robolectric Robolectric is the industry-standard unit testing framework for Android that runs tests in a simulated Android environment inside a JVM, av… | 83 | 6041 | active |
| mockk/mockk MockK is a mocking library for Kotlin providing a Kotlin-first DSL for creating mocks, stubbing behavior, and verifying calls. It supports … | 89 | 5757 | active |
| ardatan/graphql-tools GraphQL Tools is a TypeScript/JavaScript utility library for building, manipulating, mocking, and stitching GraphQL schemas using an SDL-fi… | 93 | 5432 | active |
| dubzzz/fast-check fast-check is a property-based testing framework for JavaScript and TypeScript, inspired by QuickCheck. It automatically generates test inp… | 97 | 5118 | active |
| 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… | 97 | 5016 | active |
| lk-geimfari/mimesis Mimesis is a Python library for generating fake but realistic data across 47 locales, covering names, addresses, dates, financial data, and… | 89 | 4839 | stable |
| kotest/kotest Kotest is a comprehensive, multiplatform testing framework for Kotlin offering a flexible test DSL, over 350 assertion matchers, and integr… | 98 | 4787 | active |
| spulec/freezegun FreezeGun is a Python library that lets tests 'travel through time' by mocking datetime and time module functions. It provides a decorator … | 51 | 4525 | stable |
| enzymejs/enzyme Enzyme is a JavaScript testing utility for React that makes it easier to assert, manipulate, and traverse React Components' output. Its API… | 54 | 19823 | maintenance |
| 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… | 73 | 4445 | active |
| 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… | 95 | 4345 | active |
| 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 … | 95 | 4049 | stable |
| 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… | 89 | 3927 | active |
| 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… | 59 | 3804 | stable |
| spockframework/spock Spock is a testing and specification framework for JVM developers that combines BDD-style readable specifications with powerful built-in mo… | 74 | 3631 | active |
| 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… | 89 | 3601 | stable |
| 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… | 52 | 3545 | stable |
| 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… | 84 | 3534 | stable |
| 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… | 92 | 3448 | active |
| travisjeffery/timecop Timecop is a Ruby gem that provides time travel, time freezing, and time acceleration capabilities for testing time-dependent code. It offe… | 67 | 3425 | stable |
| 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 … | 95 | 3413 | active |
| 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… | 73 | 3399 | active |
| pester/Pester Pester is the ubiquitous test and mock framework for PowerShell, providing a Describe/Context/It DSL with Should assertions and powerful co… | 98 | 3326 | active |
| thoughtbot/factory_bot_rails factory_bot_rails provides Rails integration for Factory Bot, a fixtures replacement library for defining test data with a straightforward … | 70 | 3137 | stable |
| jhnns/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… | 56 | 3093 | active |
| 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… | 96 | 2981 | active |
| nsubstitute/NSubstitute NSubstitute is a mocking library for .NET that generates substitute instances for interfaces and virtual members with a succinct, natural s… | 98 | 2972 | stable |
| 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… | 94 | 2844 | active |
| Netflix/pollyjs Polly.JS is a standalone, framework-agnostic JavaScript library for recording, replaying, and stubbing HTTP interactions in both Node and t… | 43 | 10250 | maintenance |
| 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… | 87 | 2557 | stable |
| SpectoLabs/hoverfly Hoverfly is a lightweight open-source API simulation and service virtualization tool written in Go. It captures HTTP/HTTPS traffic and repl… | 99 | 2509 | active |
| symfony/phpunit-bridge A Symfony component providing utilities for PHPUnit, most notably management and reporting of user deprecation notices. It also offers Cloc… | 99 | 2463 | stable |
| tapjs/tapjs Node-tap is a Test-Anything-Protocol (TAP) test framework for JavaScript and TypeScript, providing a test runner CLI, assertion library, sn… | 96 | 2425 | active |
| 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… | 54 | 2360 | active |
| 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… | 98 | 2323 | active |
| agiledragon/gomonkey gomonkey is a Go library that makes monkey patching in unit tests easy, allowing functions, member methods, interfaces, function variables,… | 85 | 2262 | active |
| h2non/gock gock is a Go library for declarative HTTP traffic mocking that intercepts outgoing requests via http.RoundTripper and matches them against … | 23 | 2218 | stable |
| 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 … | 75 | 2208 | active |
| erikdoe/ocmock OCMock is an Objective-C implementation of mock objects for unit testing, supporting stubs, dynamic mocks, partial mocks, and strict expect… | 23 | 2171 | stable |
| 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… | 84 | 2106 | active |
| 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 $… | 88 | 2088 | stable |
| 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… | 86 | 2077 | stable |
| 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… | 77 | 2039 | stable |
| 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… | 68 | 1967 | stable |
| phpspec/phpspec phpspec is a SpecBDD (Specification-based Behavior-Driven Development) testing framework for PHP. It guides developers to design and specif… | 91 | 1905 | active |
| 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… | 88 | 1847 | active |
| 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… | 72 | 1832 | stable |
| Pact Pact is a code-first contract testing framework that lets consumers define expected interactions with providers via a DSL and mock service,… | 99 | 1803 | active |
| 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… | 91 | 1791 | active |
| richardszalay/mockhttp A testing library for .NET that replaces HttpClient's HttpMessageHandler with a mock handler, letting you configure canned responses via a … | 86 | 1760 | active |
| 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… | 64 | 6567 | maintenance |
| Brightify/Cuckoo Cuckoo is a boilerplate-free mocking framework for Swift, using a compile-time code generator (Cuckoonator/build plugin) to create mock cla… | 92 | 1742 | active |
| 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… | 27 | 1711 | active |
| wiremock/WireMock.Net WireMock.Net is a flexible .NET library for stubbing and mocking HTTP responses with advanced request matching and response templating, bas… | 94 | 1680 | active |
| 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… | 71 | 6077 | maintenance |
| 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 … | 76 | 1629 | active |
| 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… | 97 | 1627 | active |
| jenkinsci/JenkinsPipelineUnit JenkinsPipelineUnit is a Groovy testing framework for unit testing Jenkins pipelines written in the Pipeline DSL. It provides a mock execut… | 88 | 1585 | active |
| litestar-org/polyfactory Polyfactory is a Python library that generates mock data from type hints, supporting frameworks like Pydantic, dataclasses, TypedDict, attr… | 89 | 1501 | active |
| 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 … | 66 | 1480 | stable |
| 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… | 23 | 5259 | maintenance |
| atoum/atoum atoum is a modern, standalone unit testing framework for PHP, distributed as a single PHAR archive. It offers fluent, natural-language-styl… | 10 | 1442 | active |
| 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. … | 23 | 1440 | stable |
| AliSoftware/OHHTTPStubs OHHTTPStubs is an Objective-C/Swift library for stubbing network requests in iOS and macOS apps. It intercepts requests made through Cocoa'… | 23 | 5072 | maintenance |
| dashbitco/mox Mox is an Elixir library for defining concurrent mocks based on explicit behaviours (contracts). It enforces strict mocking principles so t… | 77 | 1401 | stable |
| 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,… | 84 | 1394 | active |
| 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… | 47 | 1393 | stable |
| 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… | 80 | 1378 | active |
| 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… | 69 | 1370 | stable |
| ihsanbal/LoggingInterceptor An OkHttp interceptor library that provides pretty, configurable logging of HTTP requests and responses, with support for custom log levels… | 63 | 1359 | active |
| wheresrhys/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… | 83 | 1309 | active |
| 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. … | 98 | 1304 | active |
| 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… | 74 | 1284 | stable |
| 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 … | 78 | 1235 | active |
| 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 … | 49 | 1231 | active |
page 1 / 2 next →