Speedscale vs. Hoverfly for API Regression Tests
When you need a captured API failure to become a release check, start with Speedscale. It can replay the request your service received and serve the downstream response that triggered the failure. That lets you see how a candidate build handles the same situation. Hoverfly works well when you need an HTTP dependency simulation for a test suite you already have. Speedscale recording and replay · Hoverfly Capture mode
- Hoverfly can record and simulate HTTP exchanges, including stateful response sequences.
- Speedscale uses recorded inbound requests as regression inputs and recorded outbound responses as dependency mocks.
- A useful release fixture preserves the trigger, the dependency reply, and what the application returned to its caller.
What each workflow gives the test owner
| Task | Hoverfly | Speedscale |
|---|---|---|
| Record what a dependency returned | Proxy the dependency in Capture mode, then save the simulation. | Capture a supported dependency exchange alongside the requests the application serves. |
| Reproduce a dependency reply | Serve matching replies from a simulation. Stateful capture can preserve a sequence of different replies to repeated requests. | Serve replies from recorded outbound traffic and inspect which calls matched. |
| Share a production-derived fixture | Capture-mode middleware affects outgoing requests. Teams can review and edit the simulation before sharing it. | Apply approved DLP rules at capture and verify covered values in the resulting snapshot. |
| Check the changed application | Run the suite that supplies the requests and assertions, using Hoverfly for the dependency. | Replay recorded inputs at the candidate and compare results with a reference run. |
Hoverfly Simulate mode · Hoverfly middleware · Speedscale DLP · Speedscale replay gates
Find both sides of a recorded dependency failure
An HTTP mock can return a payment processor’s 503 on demand. The regression also needs the checkout request that led to the processor call and the outcome the application owes its caller. A test that merely verifies the mock served a 503 could miss that the application told the customer their card was declined.
The mock-lab checkout fixture includes the API request, the processor exchange, and the API response. From the root of a mock-lab checkout with proxymock and jq installed, look for inbound and outbound 503s in the same recording. This reads synthetic files locally. Checkout lab
cd labs/differential-testing
for side in in out; do
proxymock search --in proxymock/recording --direction "$side" --status 503 -o json |
jq '{total, rows: [.rows[] | {direction, location, status}]}'
done
LLM prompt for this step
In my mock-lab checkout, enter labs/differential-testing. Run proxymock search against proxymock/recording with status 503 and direction in, then with direction out. Use jq to display each total and the direction, location, and status of every result. Confirm one inbound match at /api/checkout and one outbound match at /v1/charges. Check installed command help before adapting flags and report what ran and what you observed.
The inbound row shows what the checkout service returned. The outbound row shows what the processor returned. These are different observations even though they share a status code. The lab uses the inbound request to exercise the candidate and the outbound exchange to mock the processor. The client-visible assertion is whether the service still treats the outage as retryable. Checkout test fixture
Decide what belongs in the release gate
If you already have a test that sends the right checkout input and asserts retry behavior, a Hoverfly simulation can supply the processor response. For a new incident whose shape you do not already have in the suite, Speedscale gives the team both sides of the interaction to start from. A comparison between a known-good run and a candidate run can identify a change, and CI can fail on a new mismatch. Hoverfly request matching · Speedscale CI integration
Production-derived fixtures benefit from a separate check before sharing. A response may contain a field that should be masked while another value must remain consistent so the right mock reply is selected. The capture and match report answer separate questions about what the artifact contains and what the test actually served. Speedscale field masking · Speedscale mock match reporting
A useful CI failure should point to a real disagreement. In the checkout case, a mock hit paired with the wrong client response points the team toward application logic. A mock miss points toward the outbound request or match criteria. Keeping both observations helps the person reviewing the failed build decide which change to investigate.
Start with the next incident you need to reproduce
Pick one API flow that fails because of a particular dependency response. Use Speedscale to give it a reproducible input, a known mock reply, and a result CI can act on. You can evaluate that workflow alongside the HTTP simulations your team already trusts. Get started with proxymock
Frequently asked questions
Can Hoverfly record an API and simulate it later?
Yes. Hoverfly Capture mode records proxied requests and responses. Simulate mode serves matching responses, and stateful capture can preserve a sequence of replies.
When should I choose Speedscale instead of Hoverfly?
Choose Speedscale when a traffic recording needs to drive the test and supply mocks for the dependencies your application calls. You can compare the candidate with a reference run and gate CI on new mismatches.
How does Speedscale protect captured API traffic?
Speedscale applies configured DLP rules to covered fields during capture. In Kubernetes, the forwarder can mask traffic in your cluster before sending it to Speedscale Cloud.