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
| JSON Server | 75,7151 | 2026-03-231v1.0.0-beta.15 | 2026-03-231 | MIT | JavaScript | slow |
|---|---|---|---|---|---|---|
| Faker | 19,4051 | 2026-09-141v40.39.0 | 2026-09-151 | MIT | Python | active |
| Mock Service Worker | 18,2161 | 2026-07-081v2.15.0 | 2026-09-081 | MIT | TypeScript | active |
| @faker-js/faker | 15,4931 | 2026-08-141v10.6.0 | 2026-09-221 | MIT | TypeScript | active |
| Mockito | 15,4571 | 2026-03-111v5.23.0 | 2026-09-091 | MIT | Java | active |
| Nock | 13,1261 | 2026-07-301v14.0.17 | 2026-07-301 | MIT | JavaScript | active |
| Sinon.JS | 9,7591 | 2018-01-261v4.2.2 | 2026-07-201 | BSD-3-Clause | JavaScript | active |
| Bogus | 9,7361 | 2025-10-261v35.6.5 | 2025-12-221 | MIT | C# | slow |
| Karate | 8,9651 | 2026-08-141v2.1.2 | 2026-09-191 | MIT | Java | active |
| Testcontainers for Java | 8,7411 | 2026-04-2012.0.5 | 2026-09-091 | MIT | Java | active |
| Mockoon | 8,4171 | 2026-09-161v9.9.0 | 2026-09-201 | MIT | TypeScript | active |
| factory_bot | 8,1691 | 2026-05-041v6.6.0 | 2026-08-211 | MIT | Ruby | active |
| WireMock | 7,3781 | 2025-11-1413.13.2 | 2026-09-221 | Apache-2.0 | Java | active |
| Prism | 5,0341 | 2026-07-171v5.16.0 | 2026-09-211 | Apache-2.0 | TypeScript | active |
| Testcontainers for Go | 4,9881 | 2026-08-071v0.44.0 | 2026-09-211 | MIT | Go | active |
| MockServer | 4,9741 | 2026-09-151mockserver-8.0.0 | 2026-09-221 | Apache-2.0 | Java | active |
| Responses | 4,3421 | 2026-08-2610.26.3 | 2026-09-161 | Apache-2.0 | Python | active |
| Testcontainers for Node.js | 2,6131 | 2026-08-041v12.1.0 | 2026-09-211 | MIT | TypeScript | active |
| Hoverfly | 2,5221 | 2026-09-211v1.12.15 | 2026-09-211 | Apache-2.0 | Go | active |
| Testcontainers Python | 2,3011 | 2026-07-241testcontainers-v4.15.0 | 2026-09-141 | Apache-2.0 | Python | active |
| mountebank | 2,1051 | 2026-04-151v2.9.4 | 2026-09-121 | MIT | JavaScript | active |
| Microcks | 2,0461 | 2026-08-0511.15.0 | 2026-09-221 | Apache-2.0 | Java | active |
| Datafaker | 1,7971 | 2026-06-2412.7.0 | 2026-09-211 | Apache-2.0 | Java | active |
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.
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
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
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
@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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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