What is WireMock?

WireMock is a popular open-source tool for API mock testing. It can run as a library or client wrapper in many languages, or as a standalone HTTP server. 

Started in 2011 as a Java library by Tom Akehurst, WireMock is now available in a wide range of languages and technology stacks. It has over 5 million downloads per month, and is supported by a large and highly-engaged community.

WireMock supports several approaches for creating mock APIs - in code, via its REST API, as JSON files and by recording HTTP traffic proxied to another destination. It also provides a rich matching system, allowing any part of an incoming request to be matched against complex and precise criteria. Responses of any complexity can be dynamically generated via the Handlebars based templating system. Finally, WireMock is easy to integrate into any workflow due to its numerous extension points and comprehensive APIs.

WireMock Benefits for Developers

Simulate the APIs of microservices and apps 

Create stable test and dev environments 

Isolate development from flakey 3rd parties

Mock APIs that don’t exist (or aren’t ready) 

Key features

  • HTTP response stubbing, matchable on URL, header and body content patterns
  • Stateful test sessions with advanced, real world scenarios
  • Request verification
  • Runs in unit tests, as a standalone process or as a WAR app
  • Record/playback of stubs
  • Configurable response delays and fault injection
  • Per-request conditional proxying
  • Browser proxying for request inspection and replacement
  • Stateful behaviour simulation
  • Bidirectional sync a spec in Git
All features are configurable via a fluent Java API and JSON files, or via JSON over HTTP for the standalone service.

The WireMock Ecosystem

WireMock has implementations and adapters for other languages and test frameworks. It supports adapters and implementations for Python, .NET, Golang, and Rust, among others.

For the JVM ecosystem, there are libraries for Spring Boot, Quarkus, Kotlin, Testcontainers and other. WireMock can also run on Android support, and soon to provide official gRPC and GraphQL adapters.

What is WireMock Cloud?

WireMock Cloud is a managed, hosted version of WireMock, developed by the same team who wrote the open-source project. It's built on the same technology that powers open source WireMock and is 100% compatible with the WireMock API, with additional features that make it quick and easy to mock any API you depend on. WireMock Cloud also introduces advanced capabilities such as chaos engineering, as well as better collaboration and user management.

To learn more, see the full features of WireMock Cloud or visit the documentation site.

The benefits of WireMock Cloud:

  • Web UI makes it easier to manage scale your WireMock deployment
  • Better ways to collaborate, including user management and authentication
  • Removes the need to manage hosting infrastructure and SSL
  • Get support when you need it from the people who built WireMock
  • Access to exclusive new features 
  • Import data sources into advanced scenarios and dynamic, stateful scenarios
WireMock Cloud has a generous free-forever tier, and customized pricing plans to support teams of all sizes. WireMock enterprise users get direct access to the engineers behind WireMock as well as the large and growing community of users.
Category OSS WireMock Cloud 
Deployment and maintenance Open source, need to maintain and scale by the customer: Some aspects that need to be takes care of are Hosting, Management of Domain names and SSL certificates  Cloud hosted (or K8s in the future), automated, maintained and scaled by the WireMock platform
User Interface  No UI – Only via scripts and code, high learning curve UI for your mock APIs, with a web based UI - makes it accessible for developers as well as non-developers, faster TTV, shorter onboarding
Running at scale Need to tune and configure WireMock instances for high load High scale hosting provided.
Team collaboration  X Team collaboration – Easily share mocks between teams, give various permissions levels (edit, view, admin)
User management and authentication X Supported with the ability to add users, give various permissions per user per mocks etc.
Security/Enterprise SSO X Supported
Chaos Engineering  Requires coding Built-in
Import from Swagger/Open API and Postman to create mocks X Supported
Running multiple mock processes One per API which creates an overhead of processes in scale Runs on the cloud with no impact on the customer environment
Performance metrics dashboard X Supported and gives visibility to usage and  performance
Mock API templates (Public as well as private Mock templates library) X Supported with thousands of public templates as well as ability to create company private mock templates
Support Community Support Only Enterprise Support including direct support by the Engineering team

Have More Questions?