Hyperfoil

httpRequest

Issues a HTTP request and registers handlers for the response.

Property Type Description
authority String HTTP authority (host:port) this request should target. Must match one of the entries in http section. The string can use string interpolation.
authority (alternative) Builder HTTP authority (host:port) this request should target. Must match one of the entries in http section.
body Builder HTTP request body.
body (alternative) String HTTP request body (possibly a pattern).
compensation Builder Configures additional metric compensated for coordinated omission.
compression Builder Configure response compression.
compression (alternative) String Request server to respond with compressed entity using specified content encoding.
CONNECT String Issue HTTP CONNECT request to given path. This can be a pattern.
CONNECT (alternative) Builder Issue HTTP CONNECT request to given path.
DELETE String Issue HTTP DELETE request to given path. This can be a pattern.
DELETE (alternative) Builder Issue HTTP DELETE request to given path.
endpoint Builder HTTP endpoint this request should target. Must match to the name of the entries in http section.
GET String Issue HTTP GET request to given path. This can be a pattern.
GET (alternative) Builder Issue HTTP GET request to given path.
handler Builder HTTP response handlers.
HEAD String Issue HTTP HEAD request to given path. This can be a pattern.
HEAD (alternative) Builder Issue HTTP HEAD request to given path.
headers Builder HTTP headers sent in the request.
method enum HTTP method used for the request.
Options:
  • GET
  • HEAD
  • POST
  • PUT
  • DELETE
  • OPTIONS
  • PATCH
  • TRACE
  • CONNECT
metric String Requests statistics will use this metric name.
metric (alternative) <list of strings> Allows categorizing request statistics into metrics based on the request path.
OPTIONS String Issue HTTP OPTIONS request to given path. This can be a pattern.
OPTIONS (alternative) Builder Issue HTTP OPTIONS request to given path.
PATCH String Issue HTTP PATCH request to given path. This can be a pattern.
PATCH (alternative) Builder Issue HTTP PATCH request to given path.
path String HTTP path (absolute or relative), including query and fragment. The string can use string interpolation.
path (alternative) Builder HTTP path (absolute or relative), including query and fragment.
POST String Issue HTTP POST request to given path. This can be a pattern.
POST (alternative) Builder Issue HTTP POST request to given path.
PUT String Issue HTTP PUT request to given path. This can be a pattern.
PUT (alternative) Builder Issue HTTP PUT request to given path.
sla Builder List of SLAs the requests are subject to.
sync boolean This request is synchronous; execution of the sequence does not continue until the full response is received. If this step is executed from multiple parallel instances of this sequence the progress of all sequences is blocked until there is a request in flight without response. <p> Default is true.
timeout String Request timeout - after this time the request will be marked as failed and connection will be closed. <p> Defaults to value set globally in http section.
TRACE String Issue HTTP TRACE request to given path. This can be a pattern.
TRACE (alternative) Builder Issue HTTP TRACE request to given path.

authority

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

body

Allows building HTTP request body from session variables.

Property Type Description
form Builder Build form as if we were sending the request using HTML form. This option automatically adds Content-Type: application/x-www-form-urlencoded to the request headers.
fromFile String Send contents of the file. Note that this method does NOT set content-type automatically.
fromVar String Use variable content as request body.
pattern String Pattern replacing ${sessionvar} with variable contents in a string.
text String String sent as-is.

body.form

Property Type Description
<list of mappings> <list of builders> Add input pair described in the mapping.

body.form.<list of mappings>

Form element (e.g. as if coming from an INPUT field).

Property Type Description
fromVar String Input field value from session variable.
name String Input field name.
pattern String Input field value replacing session variables in a pattern, e.g. foo${myvariable}var
value String Input field value (verbatim).

compensation

Property Type Description
metric String Metric name for the compensated results.
metric (alternative) <list of strings> Configure a custom metric for the compensated results.
targetRate double Desired rate of new virtual users per second. This is similar to constantRate.usersPerSec phase settings but works closer to legacy benchmark drivers by fixing the concurrency.
targetRate (alternative) Builder Desired rate of new virtual users per second. This is similar to constantRate.usersPerSec phase settings but works closer to legacy benchmark drivers by fixing the concurrency.

compensation.metric

Configure a custom metric for the compensated results.

Property Type Description
<list of strings> <list of strings> Allows categorizing request statistics into metrics based on the request path. The expressions are evaluated in the order as provided in the list. Use one of:
  • regexp -> replacement, e.g. ([^?]*)(\?.*)? -> $1 to drop the query part.
  • regexp (don't do any replaces and use the full path), e.g. .*.jpg
  • -> name (metric applied if none of the previous expressions match).

compensation.targetRate

Property Type Description
base double Base value used for first iteration.
increment double Value by which the base value is incremented for each (but the very first) iteration.

compression

Property Type Description
encoding String Encoding used for Accept-Encoding/TE header. The only currently supported is gzip.
type enum Type of compression (resource vs. transfer based).
Options:
  • CONTENT_ENCODING: Use Accept-Encoding in request and expect Content-Encoding in response.
  • TRANSFER_ENCODING: Use TE in request and expect Transfer-Encoding in response.

CONNECT

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

DELETE

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

endpoint

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

GET

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

handler

Manages processing of HTTP responses.

Property Type Description
autoRangeCheck boolean Inject status handler that marks the request as invalid on status 4xx or 5xx. Default value depends on ergonomics.autoRangeCheck (see User Guide).
body Processor.Builder Handle HTTP response body.
followRedirect enum Automatically fire requests when the server responds with redirection. Default value depends on ergonomics.followRedirect (see User Guide).
Options:
  • NEVER: Do not insert any automatic redirection handling.
  • LOCATION_ONLY: Redirect only upon status 3xx accompanied with a ‘location’ header. Status, headers, body and completions handlers are suppressed in this case (only raw-bytes handlers are still running). This is the default option.
  • HTML_ONLY: Handle only HTML response with META refresh header. Status, headers and body handlers are invoked both on the original response and on the response from subsequent requests. Completion handlers are suppressed on this request and invoked after the last response arrives (in case of multiple redirections).
  • ALWAYS: Implement both status 3xx + location and HTML redirects.
header HeaderHandler.Builder Handle HTTP response headers.
onCompletion Action.Builder Action executed when the HTTP response is fully received.
rawBytes RawBytesHandler.Builder Handler processing HTTP response before parsing.
status StatusHandler.Builder Handle HTTP response status.
stopOnInvalid boolean Inject completion handler that will stop the session if the request has been marked as invalid. Default value depends on ergonomics.stopOnInvalid (see User Guide).

handler.header

Handle HTTP response headers.

Property Type Description
conditional ConditionalHeaderHandler.Builder Passes the headers to nested handler if the condition holds. Note that the condition may be evaluated multiple times and therefore any nested handlers should not change the results of the condition.
countHeaders CountHeadersHandler.Builder Stores number of occurences of each header in custom statistics (these can be displayed in CLI using the stats -c command).
filter FilterHeaderHandler.Builder Compares if the header name matches expression and invokes a processor with the value.
logInvalid LogInvalidHandler.HeaderHandlerBuilder Logs headers from requests marked as invalid.
recordHeaderTime RecordHeaderTimeHandler.Builder Records alternative metric based on values from a header (e.g. when a proxy reports processing time).

handler.header.conditional

Passes the headers to nested handler if the condition holds. Note that the condition may be evaluated multiple times and therefore any nested handlers should not change the results of the condition.

Property Type Description
allConditions Builder Condition combining multiple other conditions with ‘AND’ logic.
boolCondition Builder Condition comparing boolean variables.
handler HeaderHandler.Builder One or more header handlers that should be invoked.
intCondition Builder Condition comparing integer variables.
stringCondition Builder Condition comparing string variables.

handler.header.conditional.allConditions

Test more conditions and combine the results using AND logic.

Property Type Description
<list of mappings> <list of builders> List of conditions.

handler.header.conditional.allConditions.<list of mappings>

Selector for condition type.

Property Type Description
allConditions Builder Condition combining multiple other conditions with ‘AND’ logic.
boolCondition Builder Condition comparing boolean variables.
intCondition Builder Condition comparing integer variables.
stringCondition Builder Condition comparing string variables.

handler.header.conditional.allConditions.<list of mappings>.allConditions

Test more conditions and combine the results using AND logic.

Property Type Description
<list of mappings> <list of builders> List of conditions.

handler.header.conditional.allConditions.<list of mappings>.boolCondition

Tests session variable containing boolean value.

Property Type Description
fromVar String Variable name.
value boolean Expected value.

handler.header.conditional.allConditions.<list of mappings>.intCondition

Condition comparing integer in session variable.

| Inline definition | | ——– | | Parses condition in the form <variable> <operator> <value> where operator is one of: ==, !=, <> (the same as !=), >=, >, <=, <. |

Property Type Description
equalTo Builder Compared variable must be equal to this value.
fromVar Object Variable name.
greaterOrEqualTo Builder Compared variable must be greater or equal to this value.
greaterThan Builder Compared variable must be greater than this value.
isSet boolean Check if the value is set or unset. By default the variable must be set.
lessOrEqualTo Builder Compared variable must be lower or equal to this value.
lessThan Builder Compared variable must be lower than this value.
notEqualTo Builder Compared variable must not be equal to this value.

handler.header.conditional.allConditions.<list of mappings>.stringCondition

Condition comparing string in session variable.

Property Type Description
caseSensitive boolean True if the case must match, false if the check is case-insensitive.
endsWith CharSequence Suffix for the string.
equalTo CharSequence Literal value the string should match (the same as {@link #value}).
fromVar Object Variable name.
isSet boolean Check if the value is set or unset. By default the variable must be set.
length int Check the length of the string.
length (alternative) Builder Check the length of the string.
matchVar String Fetch the value from a variable.
negate boolean Invert the logic of this condition. Defaults to false.
notEqualTo CharSequence Value that the string must not match.
startsWith CharSequence Prefix for the string.
value CharSequence Literal value the string should match.

handler.header.conditional.boolCondition

Tests session variable containing boolean value.

Property Type Description
fromVar String Variable name.
value boolean Expected value.

handler.header.conditional.handler

One or more header handlers that should be invoked.

Property Type Description
conditional ConditionalHeaderHandler.Builder Passes the headers to nested handler if the condition holds. Note that the condition may be evaluated multiple times and therefore any nested handlers should not change the results of the condition.
countHeaders CountHeadersHandler.Builder Stores number of occurences of each header in custom statistics (these can be displayed in CLI using the stats -c command).
filter FilterHeaderHandler.Builder Compares if the header name matches expression and invokes a processor with the value.
logInvalid LogInvalidHandler.HeaderHandlerBuilder Logs headers from requests marked as invalid.
recordHeaderTime RecordHeaderTimeHandler.Builder Records alternative metric based on values from a header (e.g. when a proxy reports processing time).

handler.header.conditional.intCondition

Condition comparing integer in session variable.

| Inline definition | | ——– | | Parses condition in the form <variable> <operator> <value> where operator is one of: ==, !=, <> (the same as !=), >=, >, <=, <. |

Property Type Description
equalTo Builder Compared variable must be equal to this value.
fromVar Object Variable name.
greaterOrEqualTo Builder Compared variable must be greater or equal to this value.
greaterThan Builder Compared variable must be greater than this value.
isSet boolean Check if the value is set or unset. By default the variable must be set.
lessOrEqualTo Builder Compared variable must be lower or equal to this value.
lessThan Builder Compared variable must be lower than this value.
notEqualTo Builder Compared variable must not be equal to this value.

handler.header.conditional.intCondition.equalTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.intCondition.greaterOrEqualTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.intCondition.greaterThan

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.intCondition.lessOrEqualTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.intCondition.lessThan

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.intCondition.notEqualTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.stringCondition

Condition comparing string in session variable.

Property Type Description
caseSensitive boolean True if the case must match, false if the check is case-insensitive.
endsWith CharSequence Suffix for the string.
equalTo CharSequence Literal value the string should match (the same as {@link #value}).
fromVar Object Variable name.
isSet boolean Check if the value is set or unset. By default the variable must be set.
length int Check the length of the string.
length (alternative) Builder Check the length of the string.
matchVar String Fetch the value from a variable.
negate boolean Invert the logic of this condition. Defaults to false.
notEqualTo CharSequence Value that the string must not match.
startsWith CharSequence Prefix for the string.
value CharSequence Literal value the string should match.

handler.header.conditional.stringCondition.length

Property Type Description
equalTo Builder Compared variable must be equal to this value.
greaterOrEqualTo Builder Compared variable must be greater or equal to this value.
greaterThan Builder Compared variable must be greater than this value.
lessOrEqualTo Builder Compared variable must be lower or equal to this value.
lessThan Builder Compared variable must be lower than this value.
notEqualTo Builder Compared variable must not be equal to this value.

handler.header.conditional.stringCondition.length.equalTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.stringCondition.length.greaterOrEqualTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.stringCondition.length.greaterThan

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.stringCondition.length.lessOrEqualTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.stringCondition.length.lessThan

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.conditional.stringCondition.length.notEqualTo

Inline definition
Uses the argument as a constant value.
Property Type Description
fromVar String Input variable name.
value int Value (integer).

handler.header.filter

Compares if the header name matches expression and invokes a processor with the value.

Property Type Description
header Builder Condition on the header name.
processor Processor.Builder Add one or more processors.

handler.header.filter.header

Inline definition
Literal value the string should match.
Property Type Description
caseSensitive boolean True if the case must match, false if the check is case-insensitive.
endsWith CharSequence Suffix for the string.
equalTo CharSequence Literal value the string should match (the same as {@link #value}).
length int Check the length of the string.
length (alternative) Builder Check the length of the string.
matchVar String Fetch the value from a variable.
negate boolean Invert the logic of this condition. Defaults to false.
notEqualTo CharSequence Value that the string must not match.
startsWith CharSequence Prefix for the string.
value CharSequence Literal value the string should match.

handler.header.filter.header.length

Property Type Description
equalTo Builder Compared variable must be equal to this value.
greaterOrEqualTo Builder Compared variable must be greater or equal to this value.
greaterThan Builder Compared variable must be greater than this value.
lessOrEqualTo Builder Compared variable must be lower or equal to this value.
lessThan Builder Compared variable must be lower than this value.
notEqualTo Builder Compared variable must not be equal to this value.

handler.header.recordHeaderTime

Records alternative metric based on values from a header (e.g. when a proxy reports processing time).

Property Type Description
header String Header carrying the time.
metric String Name of the created metric.
unit String Time unit in the header; use either ms or ns.

handler.rawBytes

Handler processing HTTP response before parsing.

Property Type Description
transferSizeRecorder TransferSizeRecorder.Builder Accumulates request and response sizes into custom metrics.

handler.rawBytes.transferSizeRecorder

Accumulates request and response sizes into custom metrics.

Property Type Description
key String Name of the custom metric for collecting request/response bytes.

handler.status

Handle HTTP response status.

Property Type Description
action ActionStatusHandler.Builder Perform certain actions when the status falls into a range.
counter StatusToCounterHandler.Builder Counts how many times given status is received.
multiplex MultiplexStatusHandler.Builder Multiplexes the status based on range into different status handlers.
range RangeStatusValidator.Builder Marks requests that don’t fall into the desired range as invalid.
stats StatusToStatsHandler.Builder Records number of occurrences of each status counts into custom statistics (these can be displayed in CLI using stats -c).
store StoreStatusHandler.Builder Stores the status into session variable.

handler.status.action

Perform certain actions when the status falls into a range.

Property Type Description
<any> Builder Perform a sequence of actions if the range matches. Use range as the key and action in the mapping. Possible values of the status should be separated by commas (,). Ranges can be set using low-high (inclusive) (e.g. 200-299), or replacing lower digits with ‘x’ (e.g. 2xx).

handler.status.counter

Counts how many times given status is received.

Property Type Description
add int Number to be added to the session variable.
expectStatus int Expected status (others are ignored). All status codes match by default.
init int Initial value for the session variable.
set int Do not accumulate (add), just set the variable to this value.
var String Variable name.

handler.status.multiplex

Multiplexes the status based on range into different status handlers.

Property Type Description
<any> Builder Run another handler if the range matches. Use range as the key and another status handler in the mapping. Possible values of the status should be separated by commas (,). Ranges can be set using low-high (inclusive) (e.g. 200-299), or replacing lower digits with ‘x’ (e.g. 2xx).

handler.status.multiplex.<any>

Run another handler if the range matches. Use range as the key and another status handler in the mapping. Possible values of the status should be separated by commas (,). Ranges can be set using low-high (inclusive) (e.g. 200-299), or replacing lower digits with ‘x’ (e.g. 2xx).

Property Type Description
action ActionStatusHandler.Builder Perform certain actions when the status falls into a range.
counter StatusToCounterHandler.Builder Counts how many times given status is received.
multiplex MultiplexStatusHandler.Builder Multiplexes the status based on range into different status handlers.
range RangeStatusValidator.Builder Marks requests that don’t fall into the desired range as invalid.
stats StatusToStatsHandler.Builder Records number of occurrences of each status counts into custom statistics (these can be displayed in CLI using stats -c).
store StoreStatusHandler.Builder Stores the status into session variable.

handler.status.range

Marks requests that don’t fall into the desired range as invalid.

Inline definition
Single status code (204), masked code (2xx) or range (200-399).
Property Type Description
max int Highest accepted status code.
min int Lowest accepted status code.

handler.status.store

Stores the status into session variable.

Inline definition
Variable name.
Property Type Description
toVar Object Variable name.

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

headers

Property Type Description
<any> String Use header name (e.g. Content-Type) as key and value (possibly a pattern).
<any> (alternative) Builder Use header name (e.g. Content-Type) as key and specify value in the mapping.

headers.<any>

Specifies value that should be sent in headers.

Inline definition
The value. This can be a pattern.
Property Type Description
fromVar String Load header value from session variable.
pattern String Load header value using a pattern.

metric

Allows categorizing request statistics into metrics based on the request path.

Property Type Description
<list of strings> <list of strings> Allows categorizing request statistics into metrics based on the request path. The expressions are evaluated in the order as provided in the list. Use one of:
  • regexp -> replacement, e.g. ([^?]*)(\?.*)? -> $1 to drop the query part.
  • regexp (don't do any replaces and use the full path), e.g. .*.jpg
  • -> name (metric applied if none of the previous expressions match).

OPTIONS

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

PATCH

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

path

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

POST

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

PUT

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.

sla

Defines a list of Service Level Agreements (SLAs) - conditions that must hold for benchmark to be deemed successful.

Property Type Description
<list of mappings> <list of builders> One or more SLA configurations.

sla.<list of mappings>

Defines a Service Level Agreement (SLA) - conditions that must hold for benchmark to be deemed successful.

Property Type Description
blockedRatio double Maximum allowed ratio of time spent waiting for usable connection to sum of response latencies and blocked time. Default is 0 - client must not be blocked. Set to 1 if the client can block without limits.
errorRatio double Maximum allowed ratio of errors: connection failures or resets, timeouts and internal errors. Valid values are 0.0 - 1.0 (inclusive). Note: 4xx and 5xx statuses are NOT considered errors for this SLA parameter. Use invalidRatio for that.
invalidRatio double Maximum allowed ratio of requests with responses marked as invalid. Valid values are 0.0 - 1.0 (inclusive). Note: With default settings 4xx and 5xx statuses are considered invalid. Check out ergonomics.autoRangeCheck or httpRequest.handler.autoRangeCheck to change this.
limits Builder Percentile limits.
meanResponseTime String Maximum allowed mean (average) response time. Use suffix ns, us, ms or s to specify units.
window String Period over which the stats should be collected. By default the SLA applies to stats from whole phase.

sla.<list of mappings>.limits

Percentile limits.

Property Type Description
<any> String Use percentile (value between 0.0 and 1.0) as key and response time with unit (e.g. ms) in suffix as value.

TRACE

Generic builder for generating a string.

Inline definition
A pattern for string interpolation.
Property Type Description
fromVar Object Load the string from session variable.
pattern String Use pattern replacing session variables.
value String String value used verbatim.
Close

Search results for "":