whatisgithub

What is wiremock?

wiremock/wiremock — explained in plain English

Analysis updated 2026-06-24

7,241JavaAudience · developerComplexity · 3/5Setup · easy

In one sentence

An open source tool for creating fake HTTP APIs during development and testing, so your app can run against predictable simulated services instead of depending on real external systems like payment processors or databases.

Mindmap

mindmap
  root((WireMock))
    What it does
      Fake HTTP APIs
      Test isolation
      Fault injection
    Tech Stack
      Java
      JSON config
      REST API
    Use Cases
      Integration testing
      Offline development
      Failure simulation
    Features
      Request matching
      Response templates
      Record and replay
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run automated tests without needing live payment processors, weather APIs, or third-party databases to be available.

USE CASE 2

Simulate API failures, timeouts, and slow responses to verify that your application handles errors gracefully.

USE CASE 3

Record real API traffic once, then replay those captured responses in offline tests without hitting the live service again.

USE CASE 4

Model multi-step API workflows where the response changes based on how many times an endpoint has already been called.

What is it built with?

JavaJSONREST

How does it compare?

wiremock/wiremockzhongyi-tong/wechatluckymoneyexrick/xmall
Stars7,2417,2357,233
LanguageJavaJavaJava
Setup difficultyeasyeasyhard
Complexity3/52/55/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min
No specific license was mentioned in the explanation, the project is described as open source.

So what is it?

WireMock is an open source tool for creating simulated versions of HTTP APIs. During software development and testing, your application often needs to call external services: payment processors, weather APIs, third-party databases, or other systems your team does not control. WireMock lets you define fake versions of those services that return predictable responses, so your tests and development environment can run without depending on external systems being available, reliable, or correctly configured. It started in 2011 as a Java library and now works across multiple programming languages. You can run it embedded inside unit tests (so each test controls its own simulated API), as a standalone server process, or inside a container. Configuration is done in Java code, through JSON files, or by calling WireMock's own REST API at runtime. The matching system lets you define rules that say: when an incoming request matches this URL pattern, these headers, and this request body, respond with this. Rules can match against exact values, regular expressions, or more complex patterns. Response bodies can be dynamically generated using a template system, so a single rule can produce different outputs based on what came in with the request. WireMock also supports recording and playback: you can point it at a real API, have it capture the actual traffic, and then replay those captured responses in tests without hitting the real service again. Fault injection lets you simulate network errors, timeouts, and slow responses to test how your application handles failures. Stateful behavior simulation lets you model scenarios where the API's response changes based on previous calls, like a workflow that progresses through stages. WireMock downloads over six million times per month and has full documentation at wiremock.org.

Copy-paste prompts

Prompt 1
Using WireMock in Java, show me how to stub a POST request to /payment that returns a 200 OK response with a specific JSON body.
Prompt 2
How do I configure WireMock to simulate a 30-second timeout on a third-party API so I can test my app's timeout handling?
Prompt 3
Set up WireMock in recording mode to capture traffic from api.example.com so I can replay it in tests without internet access.
Prompt 4
How do I use WireMock to return a different response the second time an endpoint is called, to simulate a retry scenario?

Frequently asked questions

What is wiremock?

An open source tool for creating fake HTTP APIs during development and testing, so your app can run against predictable simulated services instead of depending on real external systems like payment processors or databases.

What language is wiremock written in?

Mainly Java. The stack also includes Java, JSON, REST.

What license does wiremock use?

No specific license was mentioned in the explanation, the project is described as open source.

How hard is wiremock to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is wiremock for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.