Open Source Service Virtualization Tools I’ve Actually Used (and When Each One Made Sense)
Description and use
The author explains how to use open‑source service virtualization tools—Keploy, WireMock, Hoverfly, Mountebank, and Microcks—to address flaky or costly external dependencies, improving test reliability and speed.
Problem
Testing against external services can stall test suites due to cost, flakiness, or unavailability, and writing stubs by hand is time‑consuming.
Outcome
Using the appropriate tool for each scenario reduced test flakiness, eliminated costly external calls, and allowed teams to run integration tests reliably without modifying application code.
Workflow
- Identify the flaky or expensive dependency
- Choose a tool based on protocol support and maintenance needs
- Record real traffic or write stubs
- Deploy the tool in CI or local environment
- Run integration or regression tests against the virtualized service
- Iterate on stubs or recordings as needed
Evidence
Keploy records real API calls to your application, along with the calls your app makes to its own dependencies like databases and external APIs, and turns them into test cases and mocks.
WireMock started life as a Java library, and these days it also runs as a standalone server or a Docker container.
Hoverfly is written in Go and runs as a small proxy between your app and the services it calls.
Mountebank runs on Node.js and uses what it calls imposters. Each imposter listens on a port and pretends to be a service.
Microcks takes your API artifacts (OpenAPI files, AsyncAPI specs, gRPC protobufs, GraphQL schemas, even Postman collections) and turns the examples inside them into live mock endpoints.
- Record date: 2026-10-13T12:41:13.878Z