Service instances are network addresses of instances of the service that needs to be tested. There are two acceptable formats these addresses can be specified in:
- Host Port -
localhost:9000. The host must be a valid host string and the port must be a valid integer.
- Base Url -
https://lambda-api.sn126.com/api/1/org/diffy/env/example/servers/Primary/lambda. The entire string must resolve to a valid url. The URIs of requests received by Diffy will be re-written with the specified base url before being forwarded to a service instance.
The values of the following settings must conform to either of the above formats.
This is the network address of the instance running the new code that needs to be tested.
This is the network address of the old code to provide a baseline for correct behavior.
This is the network address of another instance of the old code to detect noise.
Diffy uses the following ports on localhost. All ports must be specified as valid integers:
This port is used to receive requests that will be forwarded to service instances. The default value of this port is 8880.
This port is used to serve the UI where we can see what regresssions have been caught by Diffy. The default value of this port is 8888.
Diffy implement noise cancellation with a linear model with two parameters. The motivation for changing the default values would be to eliminate false negatives or false positives. To eliminate false negatives, we would reduce both thresholds. Conversely, to reduce false positives we would increase them. Both parameters are specified as percentages.
This parameter considers the frequency of a response field being different between primary and candidate relative the frequency of it being different between primary and secondary. The default value is 20 (percent).
This parameter considers the frequency of field being different between primary and candidate relative to the total number of requests received by the endpoint. The default value is 0.03 (percent).
This is a label that shows up as the name of the service being tested in the UI. It is, specially, helpful in identifying which Diffy instance is testing which service in an environment hosting multiple Diffy instances.
Response headers may sometimes be ignored by the client application logic and may even contain metadata not being directly controlled by the service logic. In such case we may want to eliminate header comparison. We can do this by adding
--excludeHttpHeadersComparison=true to our command line arguments.
For safety reasons POST, PUT, PATCH, DELETE are ignored by default . Add
--allowHttpSideEffects=true to your command line arguments to enable these verbs.
By default the names of the resources in the UI are fetched from the
Canonical-Resource header in each
request. However this can be configured at boot with a static line, example:
In the snippet above the configuration form is:
The first matching configuration will be used.
responseMode flag can have one of 4 values -
'candidate'. The value assigned to this flag will determine which of the responses (if any) for all request sent to diffy will be returned to the client. If the flag is not explicitly assigned it defaults to