Suggest a tool

Category guides · published

"Best open source test data tools": 23 listed, sorted by GitHub stars

Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.

The test data and mocking category on FreeQATools lists open-source fake data generators, mock servers and service virtualisation tools. The table is sorted by GitHub stars on each tool's fetch date, which is a count and not a quality judgement. The sections below group the tools by kind, then by documented language, protocol and definition format.

Fake data generators and factories

Fake data libraries exist for several languages. Bogus targets C#, F# and VB.NET. Datafaker targets Java and Kotlin. @faker-js/faker runs in the browser and in Node.js. Faker is a Python library with a command-line script.

factory_bot defines Ruby factories, each with a name and a set of attributes. The factory_bot guide lists RSpec, Test::Unit, Cucumber, Spinach and Minitest among the supported runners.

Mocking inside the test process

Some libraries replace dependencies inside the running test. Mockito creates Java mocks through mock(), when() and verify(), or through annotations. Sinon.JS provides JavaScript spies, stubs and mocks. Responses mocks HTTP calls made through the Python requests library.

HTTP interception libraries for JavaScript document different protocols and environments. Nock intercepts HTTP and HTTPS calls in Node.js and can record live calls for playback. Mock Service Worker request handlers are passed to setupServer in Node.js or setupWorker in the browser. The Mock Service Worker documentation covers HTTP, GraphQL and WebSocket.

Mock servers and service virtualisation

Documented protocol coverage differs between mock servers. JSON Server serves REST routes over HTTP from a JSON or JSON5 file. Prism serves HTTP mocks from API description documents. Hoverfly simulates HTTP and HTTPS from simulation JSON files. Mockoon covers HTTP routes and WebSocket.

Other mock servers document protocols beyond HTTP. MockServer lists HTTP/2, HTTP/3, gRPC, WebSockets, raw TCP, Kafka and MQTT. mountebank lists TCP, SMTP, LDAP and gRPC among protocols implemented in the tool or as community extensions. Microcks covers REST, SOAP, GraphQL and gRPC plus Kafka, MQTT and AMQP. WireMock documents HTTP, gRPC, GraphQL and webhooks, with WebSockets in beta.

Definition formats also differ. Microcks imports OpenAPI, AsyncAPI, protobuf, GraphQL schemas, Postman collections and SoapUI projects. mountebank creates imposters through its REST API. WireMock accepts a Java API, JSON files or JSON over HTTP. Karate writes tests and mocks as feature files.

Dependencies in containers

Testcontainers for Java runs databases, browsers and services in Docker containers during tests. Its documentation lists JUnit and Spock as supported runners. Testcontainers for Go runs under the native go test framework. Testcontainers for Node.js documents a global setup example with Vitest. Testcontainers Python uses container classes as context managers.

How this list is sorted

The quoted title is a search query, not a verdict. FreeQATools does not rank tools by opinion. The list below is sorted by GitHub stars, descending, as fetched from the repository host API on the date shown with each value.

Stars count how many accounts have starred a repository. They say nothing about fit for a given project, so the documented facts under each tool are the part to compare.

Every tool here meets the inclusion rules: an OSI-approved license, a public repository, software testing or quality as its primary purpose and at least one release or tag. Each status badge follows the status rules on the methodology page.

Open-source test data and mocking tools by GitHub stars

Test data and mocking tools. Sorted by GitHub stars, descending. Select a column heading to change the sort.
JSON Server75,71512026-03-231v1.0.0-beta.152026-03-231MITJavaScriptslow
Faker19,40512026-09-141v40.39.02026-09-151MITPythonactive
Mock Service Worker18,21612026-07-081v2.15.02026-09-081MITTypeScriptactive
@faker-js/faker15,49312026-08-141v10.6.02026-09-221MITTypeScriptactive
Mockito15,45712026-03-111v5.23.02026-09-091MITJavaactive
Nock13,12612026-07-301v14.0.172026-07-301MITJavaScriptactive
Sinon.JS9,75912018-01-261v4.2.22026-07-201BSD-3-ClauseJavaScriptactive
Bogus9,73612025-10-261v35.6.52025-12-221MITC#slow
Karate8,96512026-08-141v2.1.22026-09-191MITJavaactive
Testcontainers for Java8,74112026-04-2012.0.52026-09-091MITJavaactive
Mockoon8,41712026-09-161v9.9.02026-09-201MITTypeScriptactive
factory_bot8,16912026-05-041v6.6.02026-08-211MITRubyactive
WireMock7,37812025-11-1413.13.22026-09-221Apache-2.0Javaactive
Prism5,03412026-07-171v5.16.02026-09-211Apache-2.0TypeScriptactive
Testcontainers for Go4,98812026-08-071v0.44.02026-09-211MITGoactive
MockServer4,97412026-09-151mockserver-8.0.02026-09-221Apache-2.0Javaactive
Responses4,34212026-08-2610.26.32026-09-161Apache-2.0Pythonactive
Testcontainers for Node.js2,61312026-08-041v12.1.02026-09-211MITTypeScriptactive
Hoverfly2,52212026-09-211v1.12.152026-09-211Apache-2.0Goactive
Testcontainers Python2,30112026-07-241testcontainers-v4.15.02026-09-141Apache-2.0Pythonactive
mountebank2,10512026-04-151v2.9.42026-09-121MITJavaScriptactive
Microcks2,04612026-08-0511.15.02026-09-221Apache-2.0Javaactive
Datafaker1,79712026-06-2412.7.02026-09-211Apache-2.0Javaactive

1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.

Filters for language, license and status are on the test data and mocking category page.

Tools in this list

Each entry gives the tool's one-line summary from its README and the facts its documentation states for this category, each with its source. Facts that are not documented are left out here and marked on the comparison pages.

  1. JSON Server

    npm package that serves a REST API with filtering, sorting and pagination from a JSON file. README, read 2026-09-22

    Protocols
    HTTP (REST API routes for GET, POST, PUT, PATCH, DELETE) source: README
    Definition format
    JSON or JSON5 data file (db.json or db.json5) source: README
    Install method
    npm (npm install json-server) source: README
  2. Faker

    Python library and CLI that generates localized fake data such as names, addresses and text. README, read 2026-09-22

    Languages for writing tests
    Python (3.8 and above) source: README
    Definition format
    Code (Python generator API via faker.Faker()); command-line faker script source: README
    Framework integrations
    pytest (faker fixture plugin); Factory Boy (factory.Faker) source: README
    Install method
    pip (pip install Faker) source: README
  3. Mock Service Worker

    API mocking library for JavaScript that intercepts requests at the network level in browsers and Node.js. README, read 2026-09-22

    Languages for writing tests
    JavaScript source: README
    Protocols
    HTTP, GraphQL, WebSocket source: Docs: Quick start
    Definition format
    Code (request handlers passed to setupServer in Node.js or setupWorker in the browser) source: Docs: Quick start
    Framework integrations
    Vitest (quick start setup) source: Docs: Quick start
    Install method
    npm (npm i msw --save-dev) source: Docs: Quick start
  4. @faker-js/faker

    JavaScript library that generates realistic fake data such as names, addresses and dates in many locales. README, read 2026-09-22

    Languages for writing tests
    JavaScript (browser and Node.js) source: Docs: Getting Started
    Definition format
    Code (JavaScript API methods; mustache string templates via faker.helpers.fake) source: README
    Framework integrations
    Vitest, Jest, Cypress, Playwright (examples in docs) source: Docs: Frameworks
    Install method
    npm (npm install --save-dev @faker-js/faker) source: README
  5. Mockito

    Java mocking framework for unit tests covering mock creation, stubbing, verification and spies. README, read 2026-09-22

    Languages for writing tests
    Java source: README
    Definition format
    Code (Java API: mock(), when(), verify(); @Mock, @Spy and @InjectMocks annotations) source: Docs: Mockito site
    Framework integrations
    JUnit 4 (MockitoJUnitRunner, MockitoRule); JUnit 5 extension source: Docs: Mockito Javadoc
    Install method
    Maven Central dependency org.mockito:mockito-core (Gradle, Maven) source: Docs: Mockito site
  6. Nock

    Node.js library that mocks HTTP servers and sets request expectations so modules can be tested in isolation. README, read 2026-09-22

    Languages for writing tests
    Node.js source: README
    Protocols
    HTTP, HTTPS source: README
    Definition format
    Code (nock() interceptor definitions); recording and playback of live HTTP calls source: README
    Framework integrations
    Any test framework (README example uses AVA) source: README
    Install method
    npm (npm install --save-dev nock) source: README
  7. Sinon.JS

    Standalone JavaScript library of test spies, stubs, mocks and fake timers, independent of test frameworks. README, read 2026-09-22

    Languages for writing tests
    JavaScript source: Docs: SinonJS home
    Definition format
    Code (JavaScript spies, stubs and mocks) source: README
    Framework integrations
    Any unit testing framework (docs example uses tap) source: Docs: SinonJS home
    Install method
    npm (npm install sinon); browser builds from the project homepage source: README
  8. Bogus

    Fake data generator library for C#, F# and VB.NET, ported from faker.js, for filling test databases and apps. README, read 2026-09-22

    Languages for writing tests
    C#, F#, VB.NET source: README
    Definition format
    Code (fluent Faker<T> API with RuleFor rules, modeled on FluentValidation syntax) source: README
    Install method
    NuGet package Bogus (Install-Package Bogus) source: README
  9. Karate

    Test automation framework for API, UI and performance tests and mocks, written as feature files. README, read 2026-09-22

    Languages for writing tests
    Karate DSL with Gherkin-based syntax source: Docs: Why Karate?
    Protocols
    REST over HTTP, GraphQL, SOAP, WebSocket source: Docs: Why Karate?
    Definition format
    Plain-text feature files with Karate keywords source: Docs: Why Karate?
    Framework integrations
    JUnit (karate-junit6 module) source: Docs: JUnit
    Install method
    VS Code extension, Karate CLI, Maven, Gradle or standalone JAR source: Docs: Quick Start
  10. Testcontainers for Java

    Java library for JUnit and Spock tests that runs databases, browsers and services in Docker containers. README, read 2026-09-22

    Languages for writing tests
    Java source: README
    Definition format
    Code (Java; containers declared as GenericContainer fields with the @Container annotation) source: Docs: JUnit 5 Quickstart
    Framework integrations
    JUnit 4, JUnit 5 (Jupiter), Spock source: Docs: Testcontainers for Java
    Install method
    Maven or Gradle dependency org.testcontainers:testcontainers (BOM available) source: Docs: Testcontainers for Java
  11. Mockoon

    Desktop application and CLI for designing and running mock APIs locally or in CI. README, read 2026-09-22

    Protocols
    HTTP routes; WebSocket (ws:// and wss://) source: Docs: WebSockets
    Definition format
    GUI desktop application to design and run mock servers; CLI to self-host them; OpenAPI compatibility source: README
    Install method
    Desktop: Homebrew, winget, Chocolatey, Snap, AUR; CLI: npm package @mockoon/cli, Docker image mockoon/cli source: README
  12. factory_bot

    Ruby fixtures replacement that defines test object factories with several build strategies and inheritance. README, read 2026-09-22

    Languages for writing tests
    Ruby source: README
    Definition format
    Ruby code: factories defined with a name and a set of attributes source: Docs: Getting Started
    Framework integrations
    RSpec, Test::Unit, Cucumber, Spinach, Minitest, Minitest::Spec, minitest-rails source: Docs: Getting Started
    Install method
    RubyGems (bundle add factory_bot, or gem install factory_bot) source: README
  13. WireMock

    HTTP API mocking tool that runs in unit tests, as a standalone server, or in a container. README, read 2026-09-22

    Languages for writing tests
    Java and JVM; community solutions for Python, Node.js, .NET, Go, Rust, Kotlin, Groovy and others source: Docs: WireMock Java
    Protocols
    HTTP-based protocols and REST; HTTPS, gRPC, GraphQL, webhooks; WebSockets (beta) source: Docs: WireMock Java
    Definition format
    Java API, JSON files, JSON over HTTP; record and playback of stubs source: README
    Framework integrations
    JUnit 5 Jupiter extension; JUnit 4 and Vintage source: Docs: JUnit 5+ Jupiter
    Install method
    Maven or Gradle (org.wiremock:wiremock); standalone uber JAR source: Docs: Download and Installation
  14. Prism

    OpenAPI mock server and validation proxy for API mocking and contract testing, run from the command line. README, read 2026-09-22

    Protocols
    HTTP source: README
    Definition format
    API description documents served with the prism mock and prism proxy CLI commands source: README
    Install method
    npm (@stoplight/prism-cli), standalone binaries, Docker image stoplight/prism source: Docs: Installation
  15. Testcontainers for Go

    Go package that runs Docker container dependencies for integration tests under go test. README, read 2026-09-22

    Languages for writing tests
    Go source: README
    Definition format
    Go code: containers defined programmatically inside tests source: README
    Framework integrations
    Native go test framework source: Docs: Quickstart
    Install method
    Go modules (go get github.com/testcontainers/testcontainers-go) source: Docs: Quickstart
  16. MockServer

    HTTP(S) mock server and proxy for testing, with request verification, recording and chaos injection. README, read 2026-09-22

    Languages for writing tests
    Clients for Java, JavaScript/Node, Python, Ruby, Go, PHP, .NET and Rust source: README
    Protocols
    HTTP/1.1, HTTPS, HTTP/2, HTTP/3, gRPC, gRPC-Web, JSON-RPC, WebSockets, raw TCP, Kafka, MQTT source: README
    Definition format
    JSON expectations over the REST control plane, client libraries, or generated from OpenAPI source: README
    Framework integrations
    JUnit 4 rule, JUnit 5 extension, Spring TestExecutionListener, Spring Boot starter, Maven plugin source: README
    Install method
    Docker image mockserver/mockserver; Homebrew (brew install mockserver); Maven Central; npm; Helm chart source: README
  17. Responses

    Python library that mocks the requests library with registered responses, request matchers and call assertions. README, read 2026-09-22

    Languages for writing tests
    Python 3.8 or newer source: README
    Protocols
    HTTP calls made through the Python requests library source: README
    Definition format
    Python code: mock responses registered in tests with the responses.activate decorator source: README
    Framework integrations
    pytest (fixture through pytest-responses); unittest source: README
    Install method
    pip (pip install responses) source: README
  18. Testcontainers for Node.js

    Node.js library from npm that runs Docker containers and prebuilt modules for databases and brokers in tests. README, read 2026-09-22

    Languages for writing tests
    Node.js source: Docs: Testcontainers for Node.js
    Definition format
    Code: GenericContainer API and pre-defined modules used inside test files source: Docs: Usage
    Framework integrations
    Global setup example with Vitest source: Docs: Global setup
    Install method
    npm (npm install testcontainers --save-dev); Yarn; pnpm source: Docs: Install
  19. Hoverfly

    API simulation tool that stands in for service dependencies, with latency and failure injection, a CLI and REST API. README, read 2026-09-22

    Languages for writing tests
    Java (Hoverfly Java native language binding) source: README
    Protocols
    HTTP and HTTPS source: Docs: Simulations
    Definition format
    Simulation JSON files (captured traffic, exported, edited and imported) source: Docs: Simulations
    Framework integrations
    JUnit 4 and JUnit 5, through Hoverfly Java source: Docs: Hoverfly Java
    Install method
    Binary archives; Homebrew (brew install SpectoLabs/tap/hoverfly); Docker image spectolabs/hoverfly; Helm source: Docs: Download and installation
  20. Testcontainers Python

    Python library that runs Docker containers such as PostgreSQL as context managers in integration tests. README, read 2026-09-22

    Languages for writing tests
    Python source: Docs: testcontainers-python
    Definition format
    Python code: container classes used as context managers source: README
    Install method
    pip (pip install testcontainers, with extras such as testcontainers[postgres]) source: Docs: testcontainers-python
  21. mountebank

    Service virtualization tool that stubs and records HTTP, TCP, gRPC, SMTP and other protocols for testing. README, read 2026-09-22

    Languages for writing tests
    REST API; community client libraries for C#, Clojure, Go, Java, JavaScript, PHP, Python, Ruby and others source: Docs: Client Libraries
    Protocols
    HTTP, HTTPS, TCP, SMTP, LDAP, gRPC, WebSockets, GraphQL, SNMP, Telnet, SSH, NETCONF (built in or community extension) source: README
    Definition format
    Imposters with stubs, responses and predicates, created through the REST API source: Docs: Stub Responses
    Install method
    npm (npm install -g @mbtest/mountebank); Docker image bbyars/mountebank source: Docs: Getting Started
  22. Microcks

    Cloud native platform that turns API specifications and collections into live mocks and runs contract tests. README, read 2026-09-22

    Languages for writing tests
    Java, NodeJS/TypeScript, Go and .NET through Testcontainers modules source: Docs: Testcontainers Modules
    Protocols
    HTTP (REST, SOAP, GraphQL, gRPC); Kafka, MQTT, AMQP, WebSocket, NATS, Google PubSub, Amazon SQS, Amazon SNS source: Docs: Test Parameters
    Definition format
    Existing API artifacts: OpenAPI, AsyncAPI, gRPC protobuf, GraphQL schema, Postman collections, SoapUI projects source: README
    Framework integrations
    Testcontainers modules for embedding Microcks in unit tests source: Docs: Testcontainers Modules
    Install method
    Docker or Podman image quay.io/microcks/microcks-uber source: Docs: Getting started
  23. Datafaker

    Java library that generates fake data such as names and addresses, with locales, schemas and export formats. README, read 2026-09-22

    Languages for writing tests
    Java and Kotlin source: Docs: Getting started
    Definition format
    Code (calls on a Faker instance); expression strings; CSV and JSON transformers source: README
    Install method
    Maven or Gradle dependency net.datafaker:datafaker source: README

Comparisons in this category