Hoverfly

Hoverfly

Lightweight API simulation tool

Description

The third party APIs your integration tests depend on are rate limited, have no sandbox, or go down at night, and the pipeline turns red for reasons that have nothing to do with your code. Hoverfly is a single Go binary that sits between the app and external APIs as a proxy or a web server: capture mode records real requests and responses, then simulate mode plays them back, and the external service can be up or down without affecting the run.

A recording is a JSON file you can edit, commit and import on a colleague's machine in one command. It can inject latency and random failures to exercise timeout handling, rewrite responses through middleware scripts, and synthesize mode generates responses entirely from a script. The hoverctl CLI starts, stops, switches modes and imports or exports; binaries exist for Windows, macOS and Linux.

Features



Four modes: capture, simulate, synthesize and modify.

Proxy or webserver: Intercept transparently as an HTTP(S) proxy or be called directly as the target service.

JSON simulations: Matching rules and responses live in editable, shareable, versionable JSON.

Latency and fault injection: Fixed or random delays and failures per endpoint to rehearse slow networks.

Middleware: Rewrite requests and responses with a script in any language.

hoverctl: Command line control of several instances: start, stop, mode, import, export.

Cross platform: Windows, macOS and Linux binaries, plus Docker images and Java bindings.