Skip to content

Releases: SpectoLabs/hoverfly

v1.0.1

20 Jun 10:04
Compare
Choose a tag to compare

A new helper method for response templating

We have added a new helper method for string find and replace:

{{ replace string oldValue newValue }}

For example, you can solve the problem in issue #841 with this templating function which replaces all occurrences of "_token" in the query params with an empty string.

{{ replace Request.QueryParam.access_token.[0] "_token" "" }}

Support multiple simulation imports through hoverctl

You can now import 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 simulations after hoverfly is started:

hoverctl simulation add foo.json bar.json

Bug fixes

This release also fixes the following bugs:

  • #839: Importing multiple simulations with stateful sequences should initialize all sequences
  • #852: Import an existing simulation and re-capturing the same requests will no longer create duplications.

v1.0.0

30 Apr 15:30
Compare
Choose a tag to compare

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:

"response" : {
    "headers" : {
           "Trailer": ["X-Streaming-Error"],
           "X-Streaming-Error" : [ "Connection Closed" ]
     }
}

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:

helm install incubator/hoverfly

You can find more details in the doc.

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.

v1.0.0-rc.2

15 Feb 16:42
Compare
Choose a tag to compare

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

v1.0.0-rc.1

18 Jan 15:03
Compare
Choose a tag to compare

Happy Friday! We are thrilled to announce an RC release of v1.0.0!

The v5 simulation schema introduced since v0.17.0 is stable and easy to extend for more powerful request matchers. It lays a good foundation for us to implement matcher chaining to solve XML/JSON matching issues without introducing breaking changes. That's when we start considering a Hoverfly v1 release.

Thank you for all your contributions, we are hoping to work with you again on more exciting features in the coming months, and make Hoverfly shines!

Adding delay based on Log-normal Distribution

Thanks to @podtserkovskiy's contribution, you can now enable random delay in a simulation based on log-normal distribution. Here is an example:

"globalActions": {
         "delaysLogNormal": [
            {
               "urlPattern": ".",
               "httpMethod": "",
               "min": 100,
               "max": 10000,
               "mean": 5000,
               "median": 500
            }
         ]
      }

where mean and median values could be calculated from your actual server response times, and Hoverfly generate random latencies that are lognormally distributed based on these parameters.

Controlling log level

Default log level of Hoverfly is info, but if you prefer less noise or a bit concern about the performance overheads of info logging, you can control the log level with this release:

$ hoverfly -log-level warn 

Which logs warning level or above (error, fatal and panic)

Bug fixes

Some long-standing bugs have been addressed in this release, such as bugs that affect multi-value query capture, config.yaml loading and plain HTTP tunnelling.

#704
#752
#786
#792

v0.17.7

25 Oct 09:22
Compare
Choose a tag to compare

This is a pure bugfix release to address the following issues:

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)

Query parameters were duplicated in the journal

This bug can be confusing when you need to debug an unmatched request. As reported by hoverfly-java users SpectoLabs/hoverfly-java#187, the query parameters are duplicated in the closest-match debug message.

v0.17.6

09 Oct 13:14
Compare
Choose a tag to compare

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:

--client-authentication-client-key
--client-authentication-client-cert
--client-authentication-ca-cert

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.

v0.17.5

11 Sep 10:12
Compare
Choose a tag to compare

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.

v0.17.4

23 Aug 17:57
Compare
Choose a tag to compare

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.

hoverctl start --pac-file path/to/file.pac

For more information on Using Hoverfly behind a proxy

Bug fix to stateful capture

Thanks to @john4744 for spotting and fixing a bug in stateful capture. This should now be resolved.

v0.17.3

08 Aug 17:41
Compare
Choose a tag to compare

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.

For more information on Template helpers

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

v0.17.2

09 Jul 13:20
Compare
Choose a tag to compare

More helpers for templating

We have introduced a few new template helper methods. These helpers allow you to generate date times that can be offset from the time the response is served and can also be formatted using Golang date time formats.

For more information on Template helpers