In today’s fast-paced development landscape, ensuring the smooth functioning of your applications hinges on robust and efficient API software testing. But what happens when external dependencies or incomplete APIs hold you back? Enter Hoverfly, a game-changer in the world of API testing.
Hoverfly transcends the limitations of traditional testing by offering a versatile suite of modes, allowing it to function in multiple ways:
Imagine a world where testing doesn’t require constant access to real APIs. With Hoverfly’s Capture Mode, you can achieve just that. This mode acts as a proxy, seamlessly intercepting requests made to Hoverfly and forwarding them to the actual API. The magic lies in the background – Hoverfly meticulously captures every interaction, recording the request and response pairs into a simulation file. This valuable data becomes the foundation for future testing, so you can create realistic simulations or mocks even without constant access to the real API.
Ready to unlock the power of Capture Mode? Book a free demo today and see how Hoverfly can streamline your API software testing process.
Passthrough Mode, as its name suggests, simply forwards all requests directly to the real service without attempting to match or simulate them. This mode acts as a conduit, allowing requests to flow seamlessly to the real API and back without any intervention. This is ideal for scenarios where you want to interact with the real API without modifying the environment or incurring additional overhead.
By enabling Passthrough Mode, you effectively bypass Hoverfly’s simulation and matching capabilities, ensuring that requests are processed directly by the real API. This can be particularly useful during development, testing, or troubleshooting phases when you need to verify the behaviour of the real API or isolate potential issues.
Simplify your API mocking and simulation with Passthrough Mode. Book a free demo today and discover how Hoverfly can save you time and effort.
Once you’ve captured your real API interactions, it's time to harness that data. Hoverfly’s Simulate Mode lets you create custom simulations, tailored to your specific testing needs. By leveraging the recorded request and response pairs, you can construct a virtual replica of your API, allowing you to isolate testing efforts and conduct them independently.
This is the mode Hoverfly runs in when it imitates the real API. Requests are served by Hoverfly and do not pass to the real API. In Simulate mode, Hoverfly acts as a webserver to serve up a pre-configured simulation consisting of pre-recorded or coded HTTP request/response pairs. Additionally, in Simulate Mode, Hoverfly can adopt different matching strategies and use a combination of response templating and behaviour injection to simulate realistic data and physical API behaviours.
Want to explore the possibilities of Simulate Mode? Book a free demo today and experience the flexibility and control it offers.
Hoverfly’s Spy Mode combines the best of both worlds, seamlessly integrating simulation and proxying. It primarily functions as a webserver, serving simulated responses based on your pre-recorded data. However, if the simulation encounters an unfamiliar request, Spy Mode gracefully transitions to proxy mode, forwarding the request to the real API and capturing the response for future reference. This intelligent approach ensures comprehensive testing coverage, even when unexpected scenarios arise.
In this mode, Hoverfly primarily acts as a webserver, similar to Simulate Mode. However, if the matching strategy cannot find a suitable response for a given request, it then acts as a pass-through proxy to the real service and returns the actual API response. This is particularly useful if your simulation does not account for every possible request combination and needs to rely on the real API to respond in such cases.
Interested in the benefits of Spy Mode? Book a free demo today and see how Hoverfly can enhance your API mocking and simulation testing strategy.