Hoverfly Changelog

What's new in Hoverfly 1.9.2

May 6, 2024
  • Capture on miss request in spy mode by @kapishmalik in #1126
  • Add option for fallback post serve action on passing empty action name by @kapishmalik in #1127

New in Hoverfly 1.9.1 (Apr 29, 2024)

  • What's Changed:
  • bugfix evaluating csv template string by @kapishmalik in #1125

New in Hoverfly 1.9.0 (Apr 21, 2024)

  • Add negation matcher to hoverfly by @kapishmalik in #1117
  • Update README.md by @stuioco in #1119
  • Update go to 1.22 by @viveksing in #1121
  • Add support for remote post serve action by @kapishmalik in #1123
  • Add logging and journal entry for post serve action by @kapishmalik in #1124

New in Hoverfly 1.8.0 (Mar 11, 2024)

  • What's Changed:
  • Add -log-no-quotes CLI flag to disable quoting/escaping of fields in logs by @benediktwerner in #1115
  • Fix matching score bug for body matcher by @tommysitu in #1116
  • A new response Templating function to extract data from journal by @kapishmalik. More details can be found in the doc.

New in Hoverfly 1.7.0 (Feb 28, 2024)

  • What's Changed:
  • Remove support for deprecatedQuery by @tommysitu in #1112
  • Support compound param query by @tommysitu in #1114

New in Hoverfly 1.6.3 (Jan 14, 2024)

  • Minor bug fixes for journal search endpoint.

New in Hoverfly 1.6.2 (Jan 7, 2024)

  • Minor bug fix and security update.

New in Hoverfly 1.6.1 (Nov 29, 2023)

  • Small release with a security update and revamp of the Hoverfly readthedocs with a more recent version of Sphinx v5.3.0.

New in Hoverfly 1.6.0 (Sep 13, 2023)

  • You can specify and invoke a callback for an HTTP response using post-serve action. More details can be found in this tutorial.
  • This release also includes a journal bug fix for handling binary data in the request body.

New in Hoverfly 1.5.3 (Jun 22, 2023)

  • Security updates.

New in Hoverfly 1.5.2 (Mar 18, 2023)

  • Bug fixes related to the Form and Array matcher. Thanks to @kapishmalik

New in Hoverfly 1.5.1 (Mar 6, 2023)

  • Bug fix for URL-encoded form request data capturing.

New in Hoverfly 1.4.0 (Nov 3, 2022)

  • Update to the latest goproxy
  • Introduce a new templating function based on go-fakeit to generate random data (https://docs.hoverfly.io/en/latest/pages/keyconcepts/templating/templating.html#faker-new) Thanks to @petkostas
  • Remove support for -https-only and proxy-auth flags.

New in Hoverfly 1.3.7 (Aug 22, 2022)

  • Add support for Apple silicon and ARM64 architecture support for Hoverfly Docker image.

New in Hoverfly 1.3.6 (Mar 27, 2022)

  • Renew default Hoverfly CA cert

New in Hoverfly 1.3.5 (Mar 8, 2022)

  • Pre-load cache bugfix: Cache misbehaves on version 1.3.4

New in Hoverfly 1.3.5 (Mar 8, 2022)

  • Pre-load cache bugfix: Cache misbehaves on version 1.3.4

New in Hoverfly 1.3.4 (Feb 23, 2022)

  • Bug fixes including xpath library upgrade. Add templating support for transitionsState, thanks to @ns3777k

New in Hoverfly 1.3.3 (Aug 19, 2021)

  • go 1.16 upgrade and some dependency bumps. Minor bug fixes, mainly for the JSON matcher, also handle gzipped request body for simulate and capture a bit better.

New in Hoverfly 1.3.1 (Sep 6, 2020)

  • Bug fixes

New in Hoverfly 1.3.0 (Jun 27, 2020)

  • Simulation schema is upgraded to v5.1 to support the following new features (a big thanks to @ns3777k):
  • Adding delay to a specific response
  • Serving response body from a file

New in Hoverfly 1.2.0 (Jun 11, 2020)

  • Hoverfly is migrated to Go 1.14 and using Go Modules to manage its dependencies.
  • Feature-wise, thanks to @ri-tatsu, logging to a file is now supported:
  • hoverfly -logs-output=file
  • A new matcher type xmlTemplated is added for XML loose matching with templated functions: #939

New in Hoverfly 1.1.4 (Feb 4, 2020)

  • Bug fixes and supports templating using request header, eg. {{ Request.Header.X-Header-Id }}

New in Hoverfly 1.1.3 (Oct 11, 2019)

  • A universal date time templating helper is added:

New in Hoverfly 1.1.2 (Sep 25, 2019)

  • Thanks to @kulaginds' PR, you can now use templating functions in the response headers.

New in Hoverfly 1.1.1 (Jul 23, 2019)

  • This release also fixed the following bugs:
  • Hoverfly drops HTTP Reason-Phrase from recorded responses in simulate mode.
  • Hoverfly seems to break this restriction when using https (at least) which may break clients

New in Hoverfly 1.1.0 (Jul 3, 2019)

  • CORS support:
  • You can now enable Cross-Origin Resource Sharing (CORS) support on hoverfly. Your web application running on the browser can make requests to Hoverfly even it’s not on the same domain.
  • Disable duplicate request check on simulation import:
  • Some users experience slow import for large simulation file (a few hundred MBs with lots of pairs), you can speed it up by disabling the duplicate request checking feature:
  • Custom Hoverfly response header:
  • A response proxied by Hoverfly contains header Hoverfly: Was-Here. In this release, we are adding Hoverfly: Forwarded to it if a request is not simulated but forwarded to the remote service in SPY mode.

New in Hoverfly 1.0.1 (Jun 20, 2019)

  • A new helper method for response templating
  • We have added a new help method for string find and replace:
  • For example, you can solve the problem in issue #841 with this templating function which it replaces all occurrences of "_token" in the query params with an empty string.
  • Support multiple simulation import through hoverctl
  • You can now supply multiple simulations when you start hoverfly using hoverctl :
  • hoverctl start --import foo.json --import bar.json
  • This is equivalent to the following hoverfly command:
  • hoverfly -import foo.json -import bar.json
  • You can also add additional simulation after hoverfly is started:
  • hoverctl simulation add foo.json bar.json
  • Bug fixes:
  • This release fixed the following bugs:
  • Importing multiple simulations with stateful sequences should initialize all sequences
  • Import an existing simulation and re-capturing the same requests will no longer create duplications.

New in Hoverfly 1.0.0 (May 1, 2019)

  • After the previous two RC versions, we are so excited to finally release Hoverfly v1.0.0. We really appreciate all the contributions and feedback from the community!
  • Partial JSON matching:
  • A big thanks to @dilitvinov, a new matcher (jsonPartial) is available to let you partially match a JSON document. You can find out more here here.
  • Simulate and capture HTTP response trailers:
  • Some APIs use HTTP response trailers, and we have implemented a solution to capture them as normal headers
  • Kubernetes deployment using Helm:
  • Hoverfly Helm chart has been accepted into the official Helm incubator repository.
  • You can simply run the following command to deploy Hoverfly into your Kubernetes cluster
  • Alpine based Docker image:
  • Thanks to @rusenask, the Hoverfly v1.0.0 Docker image will be much slimmer as it based on Alpine, and the Dockerfile uses multi-stage build.
  • Bug fixes:
  • Thanks to @DanielJonesEB, we have fixed issues with using Go Modules and Hoverfly.
  • Goproxy dependency version is rolled back as it has a dramatic impact on HTTPS MITM performance since the release of v1.0.0-rc.1.
  • Fix security issues in Hoverfly UI.

New in Hoverfly 1.0.0 RC 2 (Feb 15, 2019)

  • Performance improvement
  • This release improves performance. These improvements will save both CPU time and reduce latency, in some cases by a significant margin. Thanks to the Hoverfly community for their assistance in identifying and fixing these issues.
  • Hoverfly used to parse templates on every response whereas it now caches the parsed templates. Expect to see a significant improvement if your load tests contain large templated responses.
  • The response body is now only read to check the content length when absolutely necessary.
  • We have also introduced a fixed size LRU cache for request/response caching. Hoverfly no longer encodes and decodes the cached value saving a lot of CPU time.
  • The request/response cache is now fixed to 1000 entries by default which should remove the possibility of the cache exceeding the available memory. Its value can be configured with the following flag:
  • hoverfly -cache-size 100
  • Bug fix:
  • Fixed an issue which prevented hoverctl controlling a remote hoverfly running in a Docker container: #801

New in Hoverfly 1.0.0 RC 1 (Jan 21, 2019)

  • Adding delay based on Log-normal Distribution
  • Controlling log level
  • Bug fixes

New in Hoverfly 0.17.7 (Oct 25, 2018)

  • Hoverfly crashed under heavy load in webserver mode:
  • While we helped the community with load testing issues using hoverfly, we fixed a few bugs causing hoverfly to crash under load. This includes transistive bugs from an old version of logrus, concurrent read/write access to map, and usage counter failed to update in webserver mode(#776)

New in Hoverfly 0.17.6 (Oct 9, 2018)

  • Two-way SSL authentication support:
  • A huge thanks to @xiang-zhu's PR, Hoverfly finally has support for two-way SSL authentication. This new feature lets you capture or spy an HTTPS server that requires this authentication method. You can provide certificate key, client certificate and CA certificate with the following flags when starting hoverfly
  • You must also provide a host pattern using --client-authentication-destination flag to tell Hoverfly which request hosts should be called using this authentication method.
  • Bug fix to capturing concurrent requests with state:
  • Thanks again to @john4744 for fixing a concurrency issue when doing stateful capture. Hoverfly should now generate the correct state values when capturing concurrent requests.

New in Hoverfly 0.17.5 (Sep 11, 2018)

  • Bug fix to simulating concurrent requests with state:
  • Thanks again to @john4744 for spotting and fixing a bug in the state part of Hoverfly. Hoverfly did not use any locks on the state, meaning there could be concurrency issues with multiple requests and responses using and modifying state.
  • Bug fix to simulation import warnings:
  • A bug was noticed regarding warnings when importing simulations with Content-Length headers on the responses with encoded bodies. This has now been fixed.

New in Hoverfly 0.17.4 (Aug 24, 2018)

  • PAC file configuration:
  • We have added support for configuring Hoverfly with a PAC file which now allows users to dynamically change upstream proxies. Our support of PAC files is fairly primitive for now, offering support for DIRECT and PROXY commands. We currently do not support fallback upstream proxies such as PROXY proxy1.org.corp; PROXY proxy1.org.corp.
  • The PAC file can be imported to Hoverfly through a PUT request to /api/v2/hoverfly/pac or through the use of hoverctl.
  • Bug fix to stateful capture:
  • Thanks to @john4744 for spotting and fixing a bug in stateful capture. This should now be resolved.

New in Hoverfly 0.17.3 (Aug 8, 2018)

  • Request body templating:
  • We have updated templating again! This time, we've the ability to use parts of the request body in your response. This is done using jsonpath and xpath.
  • {{ Request.Body “jsonpath” “$.test” }}
  • {{ Request.Body “xpath” “/root/id” }}
  • These templating functions will retrieve parts of the document from the request based off of the query provided.
  • Empty queries:
  • With the introduction of the v5 schema, we temporarily lost the ability to define a request with zero query parameters, forcing users to have to remain using the deprecated query field from v4. This was captured is in issue #750. This version should now support zero query parameters correctly.
  • Filter out headers in diff mode:
  • From user feedback, we found some users were struggling to make sense of the changes being outputted in diff mode due to the constantly changing headers, often headers that the user did not care had changed.
  • We have updated diff mode to now support the ability to filter out headers. These are defined simiarly to how you would define capturing headers when setting the mode to capture.
  • hoverctl mode diff --headers Content-Type,Authorization
  • hoverctl mode diff --all-headers

New in Hoverfly 0.17.2 (Jul 9, 2018)

  • Fix docs typo

New in Hoverfly 0.17.1 (Jun 28, 2018)

  • There was regression in Hoverfly regarding the Content-Length and Transfer-Encoding headers being sent when using Hoverfly with HTTPs. This is against the HTTP specification, resulting in some clients throwing errors, such as in issue #727. This should now be resolved.
  • New helpers for templating
  • We have introduced some new template helper methods. These helpers allow you to generate random data and support several different data formats. If you have any ideas for additional template helper methods, feel free to raise an issue against Hoverfly and suggest them.

New in Hoverfly 0.17.0 (Jun 5, 2018)

  • We have introduced a new version of the schema. This new version changes both request queries and request headers.
  • New matcher format
  • We have updated the format of matchers. The reasoning behind this was to make them more flexible and easier to extend in the future.
  • "matcher": "exact",
  • "value": "new-matcher"
  • Request header changes
  • We have updated Headers to now allow for the user of matchers, previously, header values were defined as strings.
  • "headers": {
  • "Content-Type": [
  • "application/json"
  • In v5, you now use matchers, bringing it more inline with the other fields of a request.
  • "headers": {
  • "Content-Type": [
  • "matcher": "exact",
  • "value": "application/json"
  • Request query changes
  • We have also updated the request query field to match headers. Previously, queries were represented as strings, which didn't make much sense considering how we represented headers.
  • "query": [
  • "matcher": "exact",
  • "value": "testQuery=testValue"
  • Now, they follow the same structure as request headers. This should allow for easier matching using different matchers.
  • "query": {
  • "testQuery": [
  • "matcher": "exact",
  • "value": "testValue"
  • A downside to this that existing queries from older simulations will now get moved to a new query field called deprecatedQuery. We intend to remove this field at some point in time, but we hope everyone will be able to update their simulations to adopt this new query structure before we remove it.
  • Hoverctl warnings
  • With the introduction of a temporary field that is marked as deprecated, we have also updated the simulation import API and hoverctl to now warn users if their simulations contain deprecated fields. This warning is just a warning and does not interfere with the importing process, so it is possible to ignore this until a time that suits you best.
  • For more information on Deprecated Queries
  • Record sequences of requests
  • We have updated capture mode to now support the capturing of multiple request response pairs using the same request. This now means you can record stateful services and iterate through the recorded responses. This behaviour is not default and you will need to enable it when going into capture mode.
  • hoverctl mode capture --stateful
  • For more information on Sequences
  • For a tutorial on Sequences

New in Hoverfly 0.16.0 (Mar 20, 2018)

  • Diff Mode:
  • Thanks to @MatousJobanek for adding a new mode to Hoverfly. By switching Hoverfly into diff mode, you can now execute requests against Hoverfly and it will work out the difference between the original service's response and the response stored in the simulation.
  • New JSON Path Matching:
  • We have switched all JSON path matching in Hoverfly to now use k8s.io/client-go/util/jsonpath. The end result should be better JSON path matching that should support more queries.
  • Fixes:
  • Fixed a bug where responses over HTTPS would lose their Content-Length header
  • Added listen-on-host flag to hoverctl, thanks @fuyivara
  • Fixed a bug with scored matching where exactMatch scored the same as a loose matcher
  • Improved error logging around JSON Path and XPath matching
  • Updated build to use golang 1.10
  • Now using dep instead of godeps to manage vendored dependencies

New in Hoverfly 0.15.1 (Feb 8, 2018)

  • Capture all then selectively export:
  • hoverctl now lets you selectively export simulations, instead of exporting everything into one big JSON file. You can use —url-pattern flag with a plain text string or regex string to do the filtering. It can filter on hostname(destination) and path.
  • GetJournal API paging and filtering:
  • The Get Journal API is default to return the last 25 journal logs only, and you can control the paging using offset and limit query parameters. You can also query the requests made within a time window using from and to query parameters. The time queries support Unix timestamp.
  • Bug fix and improvements:
  • Includes the latest Hoverfly Dashboard, with Spy mode toggle and some optimisation and security fix.
  • Hoverfly running in Docker is now set to listen on all interface by default, solving the issue (eg. #686) some users experienced since the release of v0.15.0

New in Hoverfly 0.15.0 (Jan 5, 2018)

  • Spy mode:
  • Thanks to @3sunnysideup, Hoverfly has a new spy mode. When it is set, Hoverfly will only simulate the APIs that you have defined, and call real APIs for anything else. It is deemed useful if the service under test has different external dependencies, and you want to spy on particular endpoints only. To use this new feature, simply set:
  • $ hoverctl mode spy
  • Plain HTTP tunneling:
  • This setting allows Hoverfly to handle CONNECT requests for non-TLS tunnelling, making it possible to use Hoverly with Netty-based HTTP client such as reactor-netty.
  • $ hoverfly -plain-http-tunneling
  • Network interface binding:
  • Hoverfly now binds to loopback interface by default and prevents firewall alerts being triggered when running on Windows machine. If you still need Hoverfly to listen on all the network interfaces, you can do so by setting:
  • $ hoverfly -listen-on-host 0.0.0.0
  • Other minor improvements:
  • hoverctl statusis now showing if Hoverfly is running on proxy or webserver mode
  • You can now pass command line arguments when running Hoverfly Docker image, eg. $ docker run -d -p 8888:8888 -p 8500:8500 spectolabs/hoverfly -webserver

New in Hoverfly 0.14.2 (Sep 30, 2017)

  • Templating:
  • Added helper methods to use current data time for templating.
  • State keys can now be used in the template.
  • More information on templating is available here.
  • Hoverctl auto completion
  • Thanks to @joostvanwollingen, you can now add bash completion file for hoverctl by running:
  • hoverctl completion

New in Hoverfly 0.14.1 (Sep 26, 2017)

  • In this minor release, we fixed a few bugs:
  • Fix escaping bug in query params
  • Fix hoverctl middleware bug, thanks for the PR from @ooktay
  • Always sending original query to the target server in CAPTURE mode
  • There are some improvements including:
  • A new hoverctl status command which prints the status of Hoverfly
  • Support for TLS renegotiation

New in Hoverfly 0.14.0 (Aug 16, 2017)

  • State:
  • The big addition to v0.14.0 is the introduction of state. Hoverfly stores state as a key value map, allowing for multiple states to be stored at any given time. This state can then be used as a matching requirement for requests and can be modified with successful responses served.
  • Bug fixes:
  • Journal latency is now recorded as a float
  • Journal startTime is now formatted to include milliseconds
  • Requests with encoded characters in the path will now be respected and proxied on in their intended format

New in Hoverfly 0.13.0 (Jul 13, 2017)

  • Response templates:
  • Hoverfly finally has the ability to produce dynamic responses with the new templating feature. This feature allows for values from the original request being included in the response body through the use of template tags.
  • v3 Simulation:
  • With the introduction of templating, we have bumped the simulation schema version up to v3. The two changes between v2 and v3 are that the request query field no longer requires character escaping and a new boolean template field on the response to enable templating on a per request response pair basis.
  • Webserver journal bugfix:
  • It was noticed that the journal was no working when using Hoverfly as a webserver. This has been fixed and should now behave the same regardless if using Hoverfly as a webserver or a proxy.

New in Hoverfly 0.12.3 (Jul 6, 2017)

  • requestType - field in journal API responses:
  • In the last release, we added the journal API. This API could be used for seeing the requests and responses being served by Hoverfly. There was an old, unused field being used in the request object. This field has now been removed.
  • Error when importing unrecognised version:
  • In preparation for the next big release of Hoverfly, we noticed a bug. When importing simulations, Hoverfly did not provide a useful error when importing a simulation using an unsupported schema version. This has now been fixed.

New in Hoverfly 0.12.2 (Jun 26, 2017)

  • Journal:
  • To give more visibility as to what Hoverfly is up to, we have introduced a record of all requests and responses being served by Hoverfly. This can be found via the new admin API endpoint /api/v2/journal. Along with the requests and responses, metadata for each request is also recorded. This includes latency observed by Hoverfly and the mode it was in. By default, the journal will store the last 1000 requests and responses. The size of the journal is modifiable via a new -journal-size flag.
  • Hoverctl log files:
  • With the introduction of the logs API several releases ago, and then the updating of the hoverctl logs command to use the API, we have now stopped hoverctl from writing logs to disk. If there are any .log files left you in your .hoverfly/ directory, they can now be deleted as they are no longer used by hoverctl.
  • Caching bug:
  • We have fixed an issue involving caching. Hoverfly will cache each request/response it serves in an attempt to speed up matching, including failures to match. This bug occurred when
  • trying to match using specific header values, something that the cache cannot do due to how we hash each request.

New in Hoverfly 0.12.1 (Jun 17, 2017)

  • Plaintext logs from Hoverfly:
  • With this small release of Hoverfly, we have updated the logs. Previously, Hoverfly would log out to standard out using JSON formatting. This has been updated to now use the plaintext format. If you depend on JSON formatted logs in standard out, there is now a -logs flag to set the format back to json. The logs API which can be found at /api/v2/logs will still output JSON formatted logs by default.
  • Logs API date filter:
  • We have expanded the logs API to now allow the ability to filter logs based on a UNIX timestamp. This can now be done by providing the from query parameter with a UNIX timestamp value. All logs returned will be after this point in time, making it easier to follow logs and only request new log entries.
  • Content-Type bug in Hoverfly API:
  • With the introduction of plaintext log formatting to the logs API, a bug was noticed regarding the Content-Type header on responses from the Hoverfly API. Regardless of content, this header was always set to application/json. This has now been fixed so that the header is now correctly set regardless of response body content.

New in Hoverfly 0.12.0 (Jun 10, 2017)

  • Strongest match:
  • Before v0.12.0, when matching a request in simulate mode, the first match would be returned. This could often be a problem if looser request response pairs were defined at the top of a simulation.
  • To get around this, we have implemented a scoring system. Each match within a request will be scored and every request response pair from a simulation will now be checked. This should result in more accurate and reliable simulations.
  • It is still possible to use the previous matching strategy by using the --matching-strategy=first flag when setting the mode with hoverctl.
  • Closest match:
  • With the introduction of scoring request response pairs to determine the most accurate match, Hoverfly can now report the closest request response pair when a request is unmatched. When this happens, an informative report of what happening during matching is now printed both to the logs as well as the HTTP error response body. This should make it much easier now to debug failing requests going through Hoverfly.
  • Hoverfly UI:
  • The second update to Hoverfly comes in the form of the UI. The UI part of Hoverfly has been neglected for a long time and as a result, we have rebuilt using Angular. This new dashboard is now separate from the Hoverfly codebase in its own codebase

New in Hoverfly 0.11.5 (Jun 5, 2017)

  • Hoverfly shutdown API:
  • We have added a new endpoint to Hoverfly which will allow users to shutdown Hoverfly. A shutdown can be triggered by sending a DELETE HTTP request to /api/v2/shutdown. This will terminate the instance immediately.
  • Removed PIDs from hoverctl:
  • With the introduction of the shutdown API on Hoverfly, hoverctl has now been updated to no longer keep track of PIDs. Instead, hoverctl will now rely only on being able to communicate with Hoverfly via the API. This should have no functional impact on how hoverctl is used.
  • jsonMatch ordering bug:
  • A bug was noticed with the jsonMatch request field matcher. The bug was that the order of elements within the JSON provided was respected when matching, making this matcher more difficult to use. This should now be resolved.
  • Header key case bug:
  • Another bug was spotted regarding headers served by Hoverfly. They noted that Hoverfly did not always respect the upper and lower case characters of the header keys from the simulation. This has been fixed and Hoverfly should now always send headers that match the headers from the simulation loaded.
  • TLS verification bug:
  • Someone else pointed out that when setting TLS verification to false, they found Hoverfly was still applying TLS verification to proxied requests. It was promptly discovered that the TLS verification feature was working in reverse, meaning that TLS verification was disabled by default and specifying to disable it actually enabled it. This has been resolved.

New in Hoverfly 0.11.4 (May 19, 2017)

  • Logs in hoverctl:
  • We have updated and improved the hoverctl logs command. Using hoverctl logs will now print out plain text logs. To get the logs in a JSON format like before, you can now use the new --json flag. We have renamed --follow-logs to --follow. We have also updated the way we retrieve logs. Before, we were writing the logs to disk and this was created while starting a Hoverfly process. Now, we are using the logs API from Hoverfly. This means hoverctl logs will now work with both local and remote instances of Hoverfly.
  • Windows bugs in hoverctl:
  • Two bugs were found in previous versions of hoverctl that only occurred on Windows. The first bug occurred when prompted to enter a password, hoverctl would error and terminate. The other bug found was that hoverctl would not update the config file. Both of these bugs have now been fixed.
  • Default target in hoverctl:
  • The hoverctl targets command has been updated to include a default target indicator in the table of targets. We have also changed the way the default target works. Now, when it points to a target that does not exist, the default target will be changed to the local target.

New in Hoverfly 0.11.3 (May 11, 2017)

  • Previous version binary size increase:
  • As a result of updating the Hoverfly UI for v0.11.2, the Hoverfly binary increased in size. This has been fixed and the Hoverfly is now back to its original file size.
  • hoverctl config subcommands:
  • To make hoverctl easier to use, we have extended the config command with four new subcommands. It is now possible to retrieve either the host, admin port, proxy port or the auth token.
  • hoverctl config host
  • hoverctl config admin-port
  • hoverctl config proxy-port
  • hoverctl config auth-token
  • These commands can be used to get information about specific targets. For example:
  • hoverctl -t target-name config host
  • More information on hoverctl commands
  • Remote Hoverfly instances and X-HOVERFLY-AUTHORIZATION:
  • When connecting to Hoverfly, regardless if you are proxying HTTP or HTTPS requests, you still need to make an HTTP request to Hoverfly. This can be a security problem when running Hoverfly in non-local environments with authentication enabled. You may be exposing your authorization credentials or your authorization token.
  • To solve this problem, when starting a Hoverfly instance on a remote host, we recommend using the new -proxy-auth Hoverfly flag with the value header-auth.
  • This flag will disable the default security mechanisms for the proxy. Instead, Hoverfly will expect a custom security header X-HOVERFLY-AUTHORIZATION. The reason for this that depending on your HTTP client, the default Proxy-Authorization header may be included in the insecure initial request. Using a custom header will make sure the authorization token is not included in that first request.
  • hoverfly -auth -username bench -password password123 -proxy-auth=header-auth
  • Setting -proxy-auth=header-auth will enable https-only by default

New in Hoverfly 0.11.2 (Apr 28, 2017)

  • Proxy-Authorization header:
  • When authentication is enabled, you can now use a Proxy-Authorization header on the requests you are sending to the proxy. This header accepts both Basic authentication with base64 encoded value and also accepts Bearer authentication with a JWT token value. In combination with this work, we've also added the ability for disabling Basic authentication with the Hoverfly flag -disable-basic-auth .
  • More information on proxy authentication:
  • We have added a new flag to both Hoverfly and hoverctl. This flag is --https-only and will set the Hoverfly proxy to only accept HTTPS requests. Any non HTTPS requests will result in 502 Bad Gateway responses.
  • Timeout after failed authentication attempts:
  • In an effort to keep Hoverfly secure when authentication is enabled, we have added a timeout that is triggered after three unsuccessful login attempts. After the three attempts, logging in result in a 429 Too Many Requests and you will have to wait 10 minutes.
  • Version bug:
  • Due to the ongoing work to tidy up the public API of the Hoverfly library, a bug was introduced causing our mechanism to update the version number in the library to not correctly up date the version of Hoverfly. This has now been fixed with this release meaning the version number will now be consistent across Hoverfly.

New in Hoverfly 0.11.1 (Apr 19, 2017)

  • hoverctl targets:
  • We've made a big change to how hoverctl works. "Targets" make it easier to work with multiple Hoverfly instances - this is especially useful if you want to use hoverctl to manage both local and remote instances.
  • A target stores the configuration for a Hoverfly instance, so you can easily specify which instance to use when executing hoverctl commands by setting the -t / --target flag. If you do not specify a target, hoverctl will use the "default" target. Targets can be viewed using hoverctl targets and can be created using hoverctl targets create my-target.
  • A hoverctl targets tutorial:
  • hoverctl login:
  • We have added a new command for logging into an instance of Hoverfly. As part of this change, we've moved the username and password out of the config file. Instead, when using the hoverctl login command, you will be now prompted to enter a username and password.
  • More information on hoverctl login:
  • hoverctl start --auth:
  • With the introduction of the new hoverctl login command, we have also added the --auth flag to hoverctl start. Using this flag will prompt you to set a username and password which will be used to log in to the Hoverfly instance.
  • hoverctl middleware:
  • Based on feedback, we have shortened the output of the hoverctl middleware command. Before, it would print out the full middleware script. Now, it will print the first five lines so that you can confirm that a script has been set. If you want to see the full script, this can be done by using the verbose -v flag.
  • hoverctl errors to stdout:
  • It was noticed that hoverctl was not writing errors to the standard error stream. This bug has been fixed in v0.11.1.

New in Hoverfly 0.11.0 (Mar 28, 2017)

  • Request matchers (including support for XML and JSON matching, XPATH, JSONPATH and regex):
  • Originally, Hoverfly only supported "recordings". An incoming request had to exactly match a stored request for a response to be returned.
  • Since the introduction of templates, it was clear that the way we match requests in Hoverfly needed to improve. v0.11.0 brings the first phase of those improvements.
  • Recordings are now treated like templates, meaning it is even easier and simpler to modify a captured request and turn it into a looser fitting template.
  • Instead of defining request field values exactly, we have introduced a new set of matchers. Each request field (except headers) will now take an object of matchers. These matchers have allowed us to add new ways of matching data. For example, it is now possible to match a request body based on an XPath expression.
  • This change has resulted in the Hoverfly schema being updated to v2. When importing an older v1 schemaVersion simulation, Hoverfly will automatically upgrade it to v2.
  • Caching requests:
  • Previous versions of Hoverfly used a cache to store request recordings. The issue with this was you could not cache request templates, meaning a slower response time than with recording.
  • v0.11.0 has changed the way the cache works. Now, responses are stored against incoming requests meaning Hoverfly should now perform consistently regardless of how "loose" your simulation is.
  • The cache will be reloaded from your simulation every time you enter simulate mode. We have also added API endpoints for both viewing the state of the cache as well as flushing it.
  • Capture mode and headers:
  • We've changed capture mode so now by default, when you capture requests, request headers ill not be captured. This is due to the way the cache works with hashes of the request. Now, if you want to capture headers, you will need to specify them when setting capture mode.

New in Hoverfly 0.10.3 (Mar 27, 2017)

  • Updating core/cert.pem:
  • Today (24th March, 2017), the certificate that ships with Hoverfly for HTTPS/SSL traffic expired. This has prompted a new certificate which now has a 5 year expiry.
  • As a result of this, from v0.10.3 onwards, you will need to remove the current certificate from your certificate truststore and add the new one.
  • If you cannot or do not want to update your version of Hoverfly, you can work around this by generating new certificates with Hoverfly and setting them manually when starting Hoverfly.

New in Hoverfly 0.10.2 (Feb 23, 2017)

  • hoverctl errors:
  • With the change to using spf13/cobra, we introduced a bug where "index out of range" errors would be printed when parameters were missing from certain hoverctl commands. This has been fixed to print a nicer error message.
  • Authentication on the proxy:
  • We have expanded authentication within Hoverfly. Originally, turning on authentication would only take affect on the API, requiring a JWT token to communicate with Hoverfly. v0.10.2 now introduces authentication to the Hoverfly proxy.
  • Authentication for in-memory Hoverfly:
  • As part of the changes to authentication, we have also enabled the ability to use authentication with an in-memory database. Previously you were restricted to only being able to enable authentication when using BoltDB.
  • Advanced tutorials:
  • With this release, we have created a new section in the documentation for "advanced tutorials". This section includes guides that show how to use Hoverfly in more complex situations. If you have any issues or misunderstandings around the documentation, feel free to raise issues. We are always striving to improve our docs!

New in Hoverfly 0.10.1 (Feb 16, 2017)

  • Its been a month since the last release so we've got v0.10.1 ready for you. Since the last release, we've been busy improving the functional tests around Hoverfly and hoverctl, moving hoverctl over to use Cobra as well as fixing a few bugs and adding a new feature.
  • Query parameter ordering using templates:
  • In v0.10.0, we fixed a bug which meant that query parameters were being compared based on order, meaning that rearranging query parameters would cause matching to fail. Sadly, this fix was only to request recordings. This has now been applied to both templates and recordings, fixing the issue permanently.
  • Request bodies on POST and PUT requests:
  • During the refactor of v0.10.0 a bug was introduced that caused the request bodies on POST and PUT requests to be unreadable due to the preparation of bytes before being attached to a HTTP request. This has now been resolved.
  • Upstream proxy:
  • Thanks to the work of @Bruno-DaSilva, we now have the ability to run Hoverfly behind of another proxy. This opens up the possibility of using Hoverfly in environments where using a proxy is required to communicate outside of your network. Currently, this upstream proxy feature only works with unauthenticated proxies, though we are looking to address this soon.
  • Hoverctl rework:
  • Having moved over to Cobra, we have reorganized the codebase, removed irrelevant commands (delays and templates) and produced more descriptive help text for each of the hoverctl commands.

New in Hoverfly 0.10.0 (Feb 11, 2017)

  • Middleware API change:
  • We had the opportunity to look into middleware and how its managed within Hoverfly. One of the initial limitations was that the middleware had to be on the host which Hoverfly was running.
  • This was okay for local development work but as soon as you tried to use a remote Hoverfly instance or even the Hoverfly docker image, setting middleware became difficult.
  • We have addressed this by changing how you set middleware. Instead of specifying a command, the API now accepts three values: "binary", "script" and "remote". "Binary" is the binary process Hoverfly should run. This should be located on the host machine. As for "script", rather than sending a path to a file, Hoverfly will now accept the contents of the script. Once the script has been received, Hoverfly will write it into the temporary directory, deleting it when it is no longer needed. The "remote" field is for supplying a URL for middleware which can be accessed via HTTP.
  • This change in API has been reflected in hoverctl. When setting middleware with hoverctl, you are now expected to use the new middleware flags, --binary, --script, --remote.
  • hoverctl middleware --binary python --script my_middleware.py
  • For more information on setting middleware: Using middleware to simulate network latency
  • Changing database default and new hoverctl flag:
  • For a while, there has been an inconsistency between Hoverfly and hoverctl. Starting Hoverfly as a process would default to writing data to the BoltDB request.db file. Starting a Hoverfly process with hoverctl would set Hoverfly to use an in-memory database. This caused confusion for some users. By default, both Hoverfly and hoverctl will now start Hoverfly processes with an in-memory database.
  • In conjunction with this change, we have also introduced a new --database flag to hoverctl for the times when you do need to persist data with BoltDB.
  • For more information on hoverctl: hoverctl commands
  • Consistent HTTP errors from Hoverfly:
  • Through the refactoring, we have standardised the HTTP errors returned by Hoverfly. Previously, when using Hoverfly as a proxy, there were several different style errors that could occur. Now, whenever Hoverfly throws an error, it will return a response with a 512 error code and a nice description of the error. Each error that Hoverfly returns will also be logged, which will be either in the standard out of the Hoverfly process, or captured by hoverctl so they can be viewed with hoverctl logs.
  • Ordering HTTP request queries:
  • We noticed a bug regarding recorded requests with query parameters. When the HTTP request was being converted in to an internal Request object, there was no sorting on the query parameters. As a result of this, it was possible to record the same request multiple times by changing the order of the query parameters. This version of Hoverfly fixes this by always sorting the query parameters into alphabetical order when converting a HTTP request to a Request object.