# Hoverfly

API dependency simulation using captured JSON fixtures, stateful replay and controllable failures\.

ID: Q1668 · Revision: 1781

Type: software · License: Apache\-2\.0[^hoverfly-readme] · Status: active

Website: https://hoverfly.io/



Hoverfly is an Apache\-2\.0 API simulation tool for development and testing\. It can capture service interactions into reusable simulations, serve controlled responses without the original dependency and introduce behavior such as latency or failures\.[^hoverfly-readme]

## Capturing and simulating

Capture mode runs Hoverfly as a proxy between a client and the real service, recording their exchanges\. It is unavailable when Hoverfly runs as a webserver\. Simulate mode instead responds from simulation data without forwarding the request to the real API\. Choosing the mode is therefore an operational distinction: capturing still depends on the upstream service, whereas replaying a prepared simulation can remove that dependency\.[^hoverfly-capture][^hoverfly-simulate]

## Stateful response sequences

By default, capture ignores repeated requests that have not changed\. That can omit a meaningful sequence when an endpoint returns different responses to the same request over time\. Stateful capture disables that duplicate\-request handling so the sequence can be replayed in order\. A recording strategy should therefore reflect whether the service is being modeled as stateless or as a workflow with changing responses\.[^hoverfly-capture]

## Portable simulation fixtures

The command\-line workflow can export captured simulation data as JSON for editing, sharing and later reuse\. Exports can be filtered by URL pattern to separate fixtures\. Request headers are not captured by default and must be selected explicitly when needed\. This makes capture configuration part of the test fixture: a body\-and\-URL recording should not be assumed to preserve header\-dependent authentication or routing behavior\.[^hoverfly-export][^hoverfly-readme]

## HTTPS and deployment boundaries

Capturing HTTPS requires the test client to trust Hoverfly's certificate so that the proxy can inspect the encrypted exchange\. The documentation describes client\-specific certificate handling and notes that its Java integration automates this setup\. Trust configuration is therefore a prerequisite, not evidence that arbitrary encrypted traffic is inspectable without client cooperation\. The open\-source tool's Apache\-2\.0 license is distinct from the separately advertised hosted service\.[^hoverfly-https][^hoverfly-readme]

## Substitution scope

Hoverfly can substitute for [WireMock](/wiremock) for HTTP dependency simulation when a capture\-and\-replay workflow and reusable JSON fixtures fit the project\. WireMock also records proxy interactions but uses its own mappings and scenario model\. No direct fixture converter or equivalent matching behavior is established here\. Migration should verify capture headers, stateful sequences and proxy\-versus\-webserver deployment rather than assuming that the same recorded payload produces equivalent tests\.[^hoverfly-capture][^hoverfly-export][^wiremock-record][^wiremock-state]

## Capabilities and substitutions

### Proxy capture and replay — supported

Capture observes live traffic; simulate serves fixtures without forwarding to the real API\.[^hoverfly-capture][^hoverfly-simulate]

Use case: HTTP API capture and replay in tests · Platforms: Self\-hosted proxy or webserver, CLI, Java integration · Region: Version, deployment mode and client configuration requirements apply

### Stateful recording — limited

Explicit stateful capture is needed to preserve changing responses to identical requests\.[^hoverfly-capture]

Use case: HTTP API capture and replay in tests · Platforms: Self\-hosted proxy or webserver, CLI, Java integration · Region: Version, deployment mode and client configuration requirements apply

### HTTPS capture — limited

Requires test\-client trust in Hoverfly's certificate\.[^hoverfly-https]

Use case: HTTP API capture and replay in tests · Platforms: Self\-hosted proxy or webserver, CLI, Java integration · Region: Version, deployment mode and client configuration requirements apply

### [Substitute for WireMock](/wiremock) — limited

Can replace HTTP record/replay workflows; matching, state, headers and deployment configuration need verification\.[^hoverfly-capture][^hoverfly-export][^wiremock-record]

Use case: HTTP API capture and replay in tests · Platforms: Self\-hosted proxy or webserver, CLI, Java integration · Region: Version, deployment mode and client configuration requirements apply

## References

[^hoverfly-readme]: [Hoverfly repository](<https://github.com/SpectoLabs/hoverfly/blob/master/README.md>) — Simulation features, interfaces and Apache\-2\.0 license (vendor; retrieved 2026-10-07T11:08:42Z)

[^hoverfly-capture]: [Hoverfly capture mode](<https://docs.hoverfly.io/en/stable/pages/keyconcepts/modes/capture.html>) — Proxy\-only capture and stateful recording option (vendor; retrieved 2026-10-07T11:08:36Z)

[^hoverfly-simulate]: [Hoverfly simulate mode](<https://docs.hoverfly.io/en/stable/pages/keyconcepts/modes/simulate.html>) — Serving simulations without forwarding to real API (vendor; retrieved 2026-10-07T11:09:44Z)

[^hoverfly-export]: [Exporting Hoverfly simulations](<https://docs.hoverfly.io/en/latest/pages/tutorials/basic/exportingsimulations/exportingsimulations.html>) — JSON simulation export and URL filtering (vendor; retrieved 2026-10-07T11:10:24Z)

[^hoverfly-https]: [Hoverfly HTTPS simulation](<https://docs.hoverfly.io/en/latest/pages/tutorials/basic/https/https.html>) — Client trust prerequisite for TLS interception (vendor; retrieved 2026-10-07T11:09:44Z)

[^wiremock-record]: [WireMock record and playback](<https://wiremock.org/docs/record-playback/>) — Recording and snapshotting stub mappings (vendor; retrieved 2026-10-07T11:08:23Z)

[^wiremock-state]: [WireMock stateful behavior](<https://wiremock.org/docs/stateful-behaviour/>) — Scenario states and reset controls (vendor; retrieved 2026-10-07T11:08:56Z)

Source revision: https://substitutefor.net/entities/Q1668?revision=1781
