close icon

Schedule a call with the WireMock team

WireMock

The flexible tool for building mock APIs.

Create stable development environments, isolate yourself from flakey 3rd parties and simulate APIs that don't exist yet.

Get started View docs
{
  "request": {
    "method": "GET",
    "url": "/wiremock"
  },

  "response": {
    "status": 200,
    "body": "Easy!"
  }
}
z
mocklab screenshot
mocklab logo

Hosted API mocking for teams and enterprises

  • Cloud hosted - nothing to install
  • Intuitive web UI
  • Team collaboration
  • Swagger, OpenAPI and Postman import
  • 100% WireMock API compatible
Learn more Try it now
Maven
Gradle
Kotlin
SBT
Java
Docker
  • Maven
  • Gradle Groovy
  • Gradle Kotlin
  • Scala SBT
  • Standalone
  • Docker

Add the following to your project's pom.xml dependencies:

<dependency>
  <groupId>com.github.tomakehurst</groupId>
  <artifactId>wiremock-jre8</artifactId>
  <version>2.33.2</version>
  <scope>test</scope>
</dependency>

Then follow the next steps for JUnit 5+ or plain Java.

Add the following to your project's build.gradle:

testImplementation "com.github.tomakehurst:wiremock-jre8:2.33.2"

Then follow the next steps for JUnit 5+ or plain Java.

Add the following to your project's build.gradle.kts:

testImplementation("com.github.tomakehurst:wiremock-jre8:2.33.2")

Then follow the next steps for JUnit 5+ or plain Java.

Add the following to your project’s build.sbt:

libraryDependencies +=
  "com.github.tomakehurst" % "wiremock-jre8" % "2.33.2" % Test

Download the latest standalone JAR then run the following in a terminal:

java -jar wiremock-jre8-standalone-2.33.2.jar

Learn more in the running standalone guide.

Run the following in a terminal:

docker run -it --rm \
  -p 8080:8080 \
  --name wiremock \
  wiremock/wiremock:2.33.2

Learn more in the Docker guide.

Key Features

Wiremock Features

Advanced request

matching

wiremock dynamic response

Dynamic response

templating

wiremock unit tests

Run in your unit tests, on your

laptop or in your test environment.

wiremock fault and latency

Fault and latency

injection

wiremock record playback

Record / Playback

wiremock java, python, http

Java, Python, HTTP and

JSON file APIs