To get started quickly with Hoverfly Cloud, it helps to understand these three main concepts.
Hoverfly Cloud API simulations work by matching incoming HTTP requests to stored HTTP responses. A simulation is a JSON file that contains information about the HTTP requests which will be received, the responses which will be returned, and the logic that determines which requests will be matched to which responses.
A unit of CPU and memory capacity within Hoverfly Cloud which serves a simulation. A simulation can run on one instance, or on a cluster of instances. This makes it possible to start high-performance simulations for load testing.
A command line tool which can be used to:
The Hoverfly Cloud agent requires an API token to authenticate with Hoverfly Cloud. It can be installed on development machines or continuous integration servers.
Your new account is pre-loaded with an example simulation file.
On the Instances page, click the “Start” button.
Leave “Target URL” input blank to start a simulate-only instance.
Name your instance
Select the example simulation from the drop down and click “Confirm”.
When status of your instance is changed to
RUNNING, it is ready to use.
Hoverfly Cloud instance is secured by API token. You can create one from the Account page.
On your local machine, store the token in an environment variable:
setx HFC_TOKEN <my-token>
From the Account page, download and extract the agent to a location on your PATH.
Start a local reverse proxy that points to the simulation instance:
hoverfly-cloud-agent start-reverse-proxy \ --name my-test-instance \ --api-token $HFC_TOKEN
hoverfly-cloud-agent start-reverse-proxy \ --name my-test-instance \ --api-token %HFC_TOKEN%
Point your browser at http://localhost:8500, or make a request using cURL:
The response was returned by the simulation.
Stop the reverse proxy: