Open-source projects categorized as Mocking | Edit details

Top 23 Mocking Open-Source Projects

  • GitHub repo Faker.js

    generate massive amounts of realistic fake data in Node.js and the browser

    Project mention: Semantic UI on React | dev.to | 2021-06-06

    Instructions and specifications are here on it's repo - Faker Github repo.

  • GitHub repo Testify

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

    Project mention: Practical unit-testing web client in Go | dev.to | 2021-05-28

    At a high level, mocking the client means creating a new struct that implements the interface you are testing (mocking the interface). Then, provide your mocking client to the code under test. A good library with examples is testify.

  • GitHub repo Mockito

    Most popular Mocking framework for unit tests written in Java

    Project mention: Writing Apache Parquet Files | reddit.com/r/androiddev | 2021-05-30

    Hi, I've been trying to write parquet files on android for the past couple of days, and have really been struggling to find a solution. My original hypothesis was to just use the java parquet implementation (https://github.com/apache/parquet-mr), but I've since realized that not all java libraries play well with Android. I've gone through essentially dependency hell trying to franken-fit the library into my project, and imported as much as i could before hitting walls such as this one (https://github.com/mockito/mockito/issues/841).

  • GitHub repo 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).

    Project mention: Test doubles | dev.to | 2021-03-18

    Mockery is another framework for creating test doubles. It can be used with PHPUnit, phpspec, Behat, or any other testing framework. I find it especially powerful when working with legacy code, due to its support for creating partial mocks or mocking hard dependencies.

  • GitHub repo msw

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

    Project mention: Testing Next.js pages | dev.to | 2021-05-26

    MSW - API mocking tool

  • GitHub repo OHHTTPStubs

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

  • GitHub repo WireMock

    A tool for mocking HTTP services

  • GitHub repo PowerMock

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

  • GitHub repo mockoon

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

    Project mention: Mock API in a Chrome extension | dev.to | 2021-04-30

    Mock is critical in the development nowadays. Web developer like us often use tools like Mockon, Node server, API platform, Service Worker(such as msw), etc.

  • GitHub repo Pester

    Pester is the ubiquitous test and mock framework for PowerShell.

    Project mention: Pester 5.2.0 is released! | reddit.com/r/PowerShell | 2021-05-06

    A lot more info here in the release notes: Release 5.2.0 · pester/Pester (github.com)

  • GitHub repo prism

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

    Project mention: Best toolset/workflow for prototyping and iterating an API? | reddit.com/r/node | 2021-05-18

    Stoplight's prism allows you to run the mock server yourself.

  • GitHub repo VCR.py

    Automatically mock your HTTP interactions to simplify and speed up testing

    Project mention: My Python testing style guide – Stargirl (Thea) Flowers | news.ycombinator.com | 2021-03-24
  • GitHub repo httpretty

    HTTP client mocking tool for Python - inspired by Fakeweb for Ruby (by gabrielfalcao)

  • GitHub repo hoverfly

    Lightweight service virtualization/API simulation tool for developers and testers

  • GitHub repo DuckRails

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

  • GitHub repo NSubstitute

    A friendly substitute for .NET mocking libraries.

    Project mention: Cell CMS - Criando testes de maneira prática | dev.to | 2021-01-31

    nsubstitute / NSubstitute

  • GitHub repo gock

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

    Project mention: Go Package for Mocking HTTP Traffic: github.com/h2non/gock | dev.to | 2021-04-16

    Last time I covered testing in Go I mentioned a package used for testing equality called github.com/google/go-cmp, this time I will share with you a way to mock HTTP traffic using the package github.com/h2non/gock.

  • GitHub repo Cuckoo

    Boilerplate-free mocking framework for Swift!

  • GitHub repo Networking

    Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support

  • GitHub repo testdouble.js (AKA td.js)

    A minimal test double library for TDD with JavaScript

    Project mention: What you need to know about ES modules in Node.js | dev.to | 2021-01-18

    If you need an alternative for mocking, testdouble.js has full ES module support thanks to some excellent work by Gil Tayar.

  • GitHub repo FakeItEasy

    The easy mocking library for .NET

  • GitHub repo moq

    Interface mocking tool for go generate

    Project mention: Where do you place your generated mocks? | reddit.com/r/golang | 2021-02-24

    I use github.com/matryer/moq which is so simple to use and covers most cases and doesn't introduce dark magic to the code 😆

  • GitHub repo pose

    Replace any .NET method (including static and non-virtual) with a delegate

    Project mention: Best practices can slow your application down | news.ycombinator.com | 2021-03-08

    It sounds like the team is interested in adding more automated tests, but are blocked by static singletons, which have high performance but also high coupling, resulting in poor testability.

    I'm sure they've heard of test libraries like MS Fakes and [Pose](https://github.com/tonerdo/pose); I wonder if these libraries would let them maintain high performance, and only introduce the required layer of indirection during testing?

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). The latest post mention was on 2021-06-06.


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

Project Stars
1 Faker.js 32,487
2 Testify 13,533
3 Mockito 11,906
4 Mockery 9,860
5 msw 6,154
6 OHHTTPStubs 4,743
7 WireMock 4,484
8 PowerMock 3,541
9 mockoon 2,903
10 Pester 2,516
11 prism 2,087
12 VCR.py 2,013
13 httpretty 1,889
14 hoverfly 1,748
15 DuckRails 1,683
16 NSubstitute 1,564
17 gock 1,390
18 Cuckoo 1,380
19 Networking 1,287
20 testdouble.js (AKA td.js) 1,231
21 FakeItEasy 1,139
22 moq 1,018
23 pose 873
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives