Mocking

Top 23 Mocking Open-Source Projects

  • Testify

    A toolkit with common assertions and mocks that plays nicely with the standard library

  • Project mention: Why I don't use a third-party assertion library in Go unit tests | dev.to | 2024-05-20

    Of course, as soon as people saw this, the third-party assertion helper libraries started appearing. The most popular one seems to be testify (although I've never used it). Personally, I thought that the explicit check would be good enough for me, but it's true that after writing a bunch of tests, the boilerplate does seem unnecessarily verbose.

  • msw

    Seamless REST/GraphQL API mocking library for browser and Node.js.

  • Project mention: Visual Introduction to Frontend Testing Types | dev.to | 2024-05-10

    Mock Service Worker - https://mswjs.io/ (Mocking the API Responses in the browser without creating a separate mock server)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Mockito

    Most popular Mocking framework for unit tests written in Java

  • Mockery

    Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL).

  • WireMock

    A tool for mocking HTTP services

  • Project mention: Fastify Meets WireMock: External Service Mocking | dev.to | 2024-02-13

    This article reveals how to integrate WireMock into Fastify with ease, enabling developers to effortlessly generate mock responses for external services. Join us as we explore the straightforward process of seamlessly integrating and optimizing Fastify applications using WireMock for enhanced testing capabilities.

  • mockoon

    Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.

  • Project mention: Handling Firebase Notifications in Flutter: Practical Tips | dev.to | 2024-01-14

    Mockoon - Used as a logging server instead of using print in the console.

  • mockery

    A mock code autogenerator for Go (by vektra)

  • Project mention: I Write Tests in Go | news.ycombinator.com | 2024-04-10

    I'm far too lazy to write mocks by hand in go. You can generate a mock for a given interface with mockery https://github.com/vektra/mockery

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • OHHTTPStubs

    Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!

  • PowerMock

    PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.

  • prism

    Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations. (by stoplightio)

  • Project mention: How to Automatically Consume RESTful APIs in Your Frontend | dev.to | 2024-01-25

    Since the OpenAPI can effectively describe our resources, we can reuse it to generate a dummy server that can be later used for development and testing purposes without bootstrapping any actual services. There some tools available that can help us with this task, such as Prism, OpenAPI Mock, OpenAPI Backend and the MSW library we have already seen.

  • axios-mock-adapter

    Axios adapter that allows to easily mock requests

  • Pester

    Pester is the ubiquitous test and mock framework for PowerShell.

  • Project mention: PyPyInstaller Powershell Module Initial Code Push | dev.to | 2023-09-25

    Pester is what's used for most Powershell testing. While it has some pretty amazing features, it does have issues with .NET class method mocking and sometimes scope can be weird. Here's a simple example:

  • VCR.py

    Automatically mock your HTTP interactions to simplify and speed up testing

  • NSubstitute

    A friendly substitute for .NET mocking libraries.

  • Project mention: What am I missing about interfaces? | /r/csharp | 2023-11-23

    a. you might do so purely out of argo cult, i.e. because someone told you this was the right thing to do™, and that's a silly exercise. b. you could also be doing this for a good reason: to use the interface with a mocking tool like NSubstitute

  • hoverfly

    Lightweight service virtualization/ API simulation / API mocking tool for developers and testers

  • httpretty

    Intercept HTTP requests at the Python socket level. Fakes the whole socket module (by gabrielfalcao)

  • gock

    HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽

  • mountebank

    Over the wire test doubles

  • moq

    Interface mocking tool for go generate (by matryer)

  • Project mention: vektra/mockery has fully released the "packages" feature! This blog explains what it is and how it works. | /r/golang | 2023-07-11
  • DuckRails

    Development tool to mock API endpoints quickly and easily (docker image available)

  • FakeItEasy

    The easy mocking library for .NET

  • Cuckoo

    Boilerplate-free mocking framework for Swift! (by Brightify)

  • Project mention: Tests Everywhere - Swift | dev.to | 2023-12-12

    Swift testing this simple Hello World with XCTest and Cuckoo

  • mockhttp

    Testing layer for Microsoft's HttpClient library. Create canned responses using a fluent API.

  • Project mention: Mock heavy tests | /r/dotnet | 2023-06-01

    I'd say that without wanting to refactor the code a little bit (maybe moving those HttpClients into a service so that they are easily mocked) your best bet would be to use something like WireMock or MockHttp.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Mocking related posts

  • I Write Tests in Go

    1 project | news.ycombinator.com | 10 Apr 2024
  • Fastify Meets WireMock: External Service Mocking

    2 projects | dev.to | 13 Feb 2024
  • Unit Test Like a Pro: Automock, My Open Source Answer to Mocking Frustration 🤓💡🎭

    1 project | dev.to | 12 Dec 2023
  • Show HN: Automock – Open-Source Project for Simpler Unit Testing in TypeScript

    2 projects | news.ycombinator.com | 11 Dec 2023
  • The most effective Schema-Driven Development using OpenAPI for Logistic Engineer

    2 projects | dev.to | 9 Dec 2023
  • What direction can I take to mocking a data structure that is relational on the front-end while I wait for backend endpoints to be created?

    2 projects | /r/Frontend | 9 Dec 2023
  • What direction can I take to mock a (relational?) data-structure on the front-end while I wait for backend endpoints to be created?

    2 projects | /r/webdev | 9 Dec 2023
  • A note from our sponsor - SaaSHub
    www.saashub.com | 21 May 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source Mocking projects? This list will help you:

Project Stars
1 Testify 22,152
2 msw 14,946
3 Mockito 14,615
4 Mockery 10,572
5 WireMock 6,112
6 mockoon 5,921
7 mockery 5,682
8 OHHTTPStubs 5,012
9 PowerMock 4,129
10 prism 4,041
11 axios-mock-adapter 3,394
12 Pester 3,032
13 VCR.py 2,619
14 NSubstitute 2,562
15 hoverfly 2,314
16 httpretty 2,094
17 gock 2,030
18 mountebank 1,979
19 moq 1,775
20 DuckRails 1,718
21 FakeItEasy 1,645
22 Cuckoo 1,642
23 mockhttp 1,551

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com