To get started Hoverfly Cloud, you only need to understand 3 concepts: Services, Scenarios and Simulations.
Hoverfly Cloud services simulates real HTTP services such as web APIs and SOAP services. You can think of Hoverfly Cloud services as API Simulations, over the wire test doubles, or more highly configurable HTTP stubs and mocks.
Hoverfly Cloud uses our Open Source tool, Hoverfly to simulate a service. Hoverfly Cloud uses Kubernetes to run and manage multiple copies of Hoverfly, and adds a powerful GUI with many additional capabilities.
If you have used Hoverfly you will know that it captures the interactions of a HTTP Service in a Simulation file.
Simulations are JSON files that contains pairs of HTTP requests and their corresponding HTTP responses (also known as request/response pairs).
You can also create simulations in Hoverfly Cloud. If you have an account you can see yours on the Simulations page here. Hoverfly Cloud also allows you to create Simulations from Swagger definitions.
A Scenario is a collection of Services. For example, suppose you are testing an application to support mortgage approvals. A Scenario would define multiple services such as the Land Registry to validate the property reference, postcode validation, customer validation, credit checks, and so on. This complex data-rich set of services would change each time you change and test your application. You would be forced to manually test your application but a Hoverfly Scenario could capture the multiple interactions with the services and allow tests to be automated.
You can use a Hoverfly Cloud Scenario to model a business scenario for many purposes but primarily for application testing. Some more examples are modelling a payment gateway where all services are working normally, or conversely a flaky third-party API that intermittently fails. A mobile banking app would need to handle all situations transparently.
A ‘business as normal Scenario’ can be reconfigured to predictably inject a variety of errors or behaviours, for instance retail application could have a Black Friday Scenario where there is adverse network latency. Scenarios therefore allow you to model business as normal and error situations quickly and easily.
The ability to manage many simulated services in one Scenario has significant benefits in saving time, reducing duplication of effort and simplifying the process of sharing a consistent set of services across teams.
A Scenario describes multiple Services and their configuration data and can be started in seconds.
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.