Processors
Processors can work either as consumers of input bytes (e.g. storing part of the input into session variables), as filters (passing modified version of the input to delegated processors) or combination of the above.
Some processors can expect extra context in the session, such as an ongoing (HTTP) request. It is possible to use processors that don’t expect specific type of request in places where a more specific type is provided; opposite is not allowed.
Also it is possible to use an action instead of a processor; Hyperfoil automatically inserts an adapter. That’s why the list below includes actions as well.
1 - addItem
Appends value to an array stored in another variable.
Appends value to an array stored in another variable.
Property | Type | Description |
---|
fromVar | String | Fetch value from session variable. |
toVar | String | Destination variable with the array. |
value | String | Verbatim value. |
2 - addToInt
Add value to integer variable in the session.
Add value to integer variable in the session.
Inline definition |
---|
Accepting one of: var++ , var– , var += value , |
var -= value . |
Property | Type | Description |
---|
orElseSetTo | int | If the variable is currently not set, set it to this value instead of addition. |
value | int | Value added (can be negative). |
var | String | Variable name. |
3 - addToSharedCounter
Adds value to a counter shared by all sessions in the same executor.
Adds value to a counter shared by all sessions in the same executor.
Inline definition |
---|
Use on of: counter++ , counter– , counter += <value> , |
counter -= <value> |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
key | String | Identifier for the counter. |
operator | enum | Operation to perform on the counter. Default is ADD . Options: |
value | int | Value (integer). |
4 - array
Stores data in an array stored as session variable.
Stores data in an array stored as session variable.
Inline definition |
---|
Use format toVar[maxSize] . |
Property | Type | Description |
---|
format | enum | Format into which should this processor convert the buffers before storing. Default is STRING . Options:BYTEBUF Store the buffer directly. Beware that this may cause memory leaks!BYTES Store data as byte array.STRING Interprets the bytes as UTF-8 string.
|
maxSize | int | Maximum size of the array. |
silent | boolean | Do not log warnings when the maximum size is exceeded. |
toVar | String | Variable name. |
5 - clearHttpCache
Drops all entries from HTTP cache in the session.
Drops all entries from HTTP cache in the session.
6 - closeConnection
Prevents reuse connection after the response has been handled.
Prevents reuse connection after the response has been handled.
7 - collection
Collects results of processor invocation into a unbounded list.
Collects results of processor invocation into a unbounded list.
WARNING: This processor should be used rarely as it allocates memory during the benchmark.
Inline definition |
---|
Variable name to store the list. |
Property | Type | Description |
---|
format | enum | Format into which should this processor convert the buffers before storing. Default is STRING . Options:BYTEBUF Store the buffer directly. Beware that this may cause memory leaks!BYTES Store data as byte array.STRING Interprets the bytes as UTF-8 string.
|
toVar | String | Variable name. |
8 - conditional
Passes the data to nested processor if the condition holds.
Passes the data to nested processor if the condition holds.
Note that the condition may be evaluated multiple times and therefore any nested processors 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. |
intCondition | Builder | Condition comparing integer variables. |
processor | Processor.Builder | One or more processors that should be invoked if the condition holds. |
stringCondition | Builder | Condition comparing string variables. |
allConditions
Test more conditions and combine the results using AND logic.
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. |
allConditions.<list of mappings>.allConditions
Test more conditions and combine the results using AND logic.
allConditions.<list of mappings>.boolCondition
Tests session variable containing boolean value.
Property | Type | Description |
---|
fromVar | String | Variable name. |
value | boolean | Expected value. |
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. |
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. |
boolCondition
Tests session variable containing boolean value.
Property | Type | Description |
---|
fromVar | String | Variable name. |
value | boolean | Expected value. |
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. |
intCondition.equalTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.greaterOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.greaterThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.lessOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.lessThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.notEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
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. |
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. |
stringCondition.length.equalTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.greaterOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.greaterThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.lessOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.lessThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.notEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
9 - count
Records number of parts this processor is invoked on.
Records number of parts this processor is invoked on.
Inline definition |
---|
Name of variable for the number of occurrences. |
Property | Type | Description |
---|
toVar | String | Variable where to store number of occurrences. |
10 - fail
Fail the phase with given message. Used mostly for testing/debugging.
Fail the phase with given message. Used mostly for testing/debugging.
Inline definition |
---|
Message to fail with (unconditionally). |
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. |
message | String | Message attached to the failure exception. |
stringCondition | Builder | Condition comparing string variables. |
allConditions
Test more conditions and combine the results using AND logic.
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. |
allConditions.<list of mappings>.allConditions
Test more conditions and combine the results using AND logic.
allConditions.<list of mappings>.boolCondition
Tests session variable containing boolean value.
Property | Type | Description |
---|
fromVar | String | Variable name. |
value | boolean | Expected value. |
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. |
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. |
boolCondition
Tests session variable containing boolean value.
Property | Type | Description |
---|
fromVar | String | Variable name. |
value | boolean | Expected value. |
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. |
intCondition.equalTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.greaterOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.greaterThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.lessOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.lessThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.notEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
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. |
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. |
stringCondition.length.equalTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.greaterOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.greaterThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.lessOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.lessThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringCondition.length.notEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
11 - getIndex
Lookup index of an item in an array/collection.
Lookup index of an item in an array/collection.
Property | Type | Description |
---|
collection | String | Variable to fetch the collection from. |
item | Builder | Item that should be looked up (using equality). |
toVar | String | Integer variable to store the index, or -1 if the item is not found. |
item
Inline definition |
---|
Verbatim value. |
Property | Type | Description |
---|
fromVar | String | Fetch value from session variable. |
value | String | Verbatim value. |
12 - getItem
Retrieves n-th item from an array or collection.
Retrieves n-th item from an array or collection.
Property | Type | Description |
---|
fromVar | String | Source variable with an array or list. |
index | Builder | Source for index into the array/list. |
toVar | String | Destination variable for the n-th element. |
index
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
13 - getSharedCounter
Retrieves value from a counter shared by all sessions in the same executor and stores that in a session variable.
Retrieves value from a counter shared by all sessions in the same executor and stores that in a session variable.
If the value exceeds allowed integer range (-2^31 .. 2^31 - 1) it is capped.
Inline definition |
---|
Both the key and variable name. |
Property | Type | Description |
---|
key | String | Identifier for the counter. |
toVar | String | Session variable for storing the value. |
14 - getSize
Calculates size of an array/collection held in variable into another variable
Calculates size of an array/collection held in variable into another variable
Property | Type | Description |
---|
boolFilter | Builder | Count only items matching the condition. |
fromVar | String | Variable holding the collection. |
intFilter | Builder | Count only items matching the condition. |
stringFilter | Builder | Count only items matching the condition. |
toVar | String | Variable storing the size. |
undefinedValue | int | Value to use when fromVar is unset or it does not contain any array/collection. |
boolFilter
Property | Type | Description |
---|
value | boolean | Expected value. |
intFilter
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. |
intFilter.equalTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intFilter.greaterOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intFilter.greaterThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intFilter.lessOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intFilter.lessThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intFilter.notEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringFilter
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. |
stringFilter.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. |
stringFilter.length.equalTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringFilter.length.greaterOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringFilter.length.greaterThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringFilter.length.lessOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringFilter.length.lessThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
stringFilter.length.notEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
15 - gzipInflator
Decompresses a GZIP data and pipes the output to delegated processors.
Decompresses a GZIP data and pipes the output to delegated processors.
If the data contains multiple concatenated GZIP streams it will pipe multiple decompressed objects with isLastPart
set to true at the end of each stream.
Property | Type | Description |
---|
encodingVar | Object | Variable used to pass header value from header handlers. |
processor | Processor.Builder | Add one or more processors. |
16 - json
Parses JSON responses using simple queries.
Parses JSON responses using simple queries.
Property | Type | Description |
---|
delete | boolean | If this is set to true, the selected key will be deleted from the JSON and the modified JSON will be passed to the processor . |
format | enum | Conversion to apply on the matching parts with ’toVar’ or ’toArray’ shortcuts. Options:BYTEBUF Store the buffer directly. Beware that this may cause memory leaks!BYTES Store data as byte array.STRING Interprets the bytes as UTF-8 string.
|
processor | Processor.Builder | Add one or more processors. |
processor (alternative) | Processor.Builder | If neither delete or replace was set this processor will be called with the selected parts. In the other case the processor will be called with chunks of full (modified) JSON.Note that the processor.before() and processor.after() methods are called only once for each request, not for the individual filtered items. |
query | String | Query selecting the part of JSON. |
replace | Transformer.Builder | Custom transformation executed on the value of the selected item. Note that the output value must contain quotes (if applicable) and be correctly escaped. |
replace (alternative) | String | Replace value of selected item with value generated through a pattern. Note that the result must contain quotes and be correctly escaped. |
toArray | String | Shortcut to store selected parts in an array in the session. Must follow the pattern variable[maxSize] |
toVar | String | Shortcut to store first match in given variable. Further matches are ignored. |
unquote | boolean | Automatically unquote and unescape the input values. By default true. |
replace
Custom transformation executed on the value of the selected item. Note that the output value must contain quotes (if applicable) and be correctly escaped.
Property | Type | Description |
---|
actions | ActionsTransformer.Builder | This transformer stores the (defragmented) input into a variable, using requested format. After that it executes all the actions and fetches transformed value using the pattern. |
pattern | Pattern.TransformerBuilder | Use pattern replacing session variables. |
replace.actions
This transformer stores the (defragmented) input into a variable, using requested format. After that it executes all the actions and fetches transformed value using the pattern.
Property | Type | Description |
---|
actions | Action.Builder | Actions to be executed. |
format | enum | Format into which should this transformer convert the buffers before storing. Default is STRING . Options:BYTEBUF Store the buffer directly. Beware that this may cause memory leaks!BYTES Store data as byte array.STRING Interprets the bytes as UTF-8 string.
|
pattern | String | Pattern to use when fetching the transformed value. |
var | String | Variable used as the intermediate storage for the data. |
replace.pattern
Use pattern replacing session variables.
Inline definition |
---|
The pattern formatting string. |
Property | Type | Description |
---|
pattern | String | Use pattern replacing session variables. |
17 - log
Log a message and variable values.
Log a message and variable values.
Inline definition |
---|
A pattern for |
string |
interpolation. |
18 - logInvalid
Logs body chunks from requests marked as invalid.
Logs body chunks from requests marked as invalid.
19 - markRequestInvalid
Unconditionally mark currently processed request as invalid.
Unconditionally mark currently processed request as invalid.
20 - newSequence
Instantiates a sequence for each invocation.
Instantiates a sequence for each invocation.
Inline definition |
---|
Sequence name. |
Property | Type | Description |
---|
concurrencyPolicy | enum | Options: |
forceSameIndex | boolean | Forces that the sequence will have the same index as the currently executing sequence. This can be useful if the sequence is passing some data to the new sequence using sequence-scoped variables. Note that the new sequence must have same concurrency factor as the currently executing sequence. |
sequence | String | Name of the instantiated sequence. |
21 - parseHtml
Parses HTML tags and invokes handlers based on criteria.
Parses HTML tags and invokes handlers based on criteria.
Property | Type | Description |
---|
onEmbeddedResource | Builder | Handler firing upon reference to other resource, e.g. image, stylesheet… |
onTagAttribute | Builder | <no description> |
onEmbeddedResource
Handles <img src="…">
, <link href="…">
, <embed src="…">
, <frame src="…">
, <iframe src="…">
, <object data="…">
and <script src="…">
.
Does not handle <source src="…">
or <track src="…">
because browser would choose only one of the options.
Property | Type | Description |
---|
fetchResource | Builder | Automatically download referenced resource. |
ignoreExternal | boolean | Ignore resources hosted on servers that are not covered in the http section. |
processor | Processor.Builder | Add one or more processors. |
processor (alternative) | Processor.Builder | Custom processor invoked pointing to attribute data - e.g. in case of <img> tag the processor gets contents of the src attribute. |
onEmbeddedResource.fetchResource
Automates download of embedded resources.
Property | Type | Description |
---|
concurrency | int | Maximum number of resources fetched concurrently. Default is 8. |
maxResources | int | Maximum number of resources that can be fetched. |
metric | <list of strings> | Metrics selector for downloaded resources. |
onCompletion | Action.Builder | Action performed when the download of all resources completes. |
onEmbeddedResource.fetchResource.metric
Metrics selector for downloaded resources.
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).
|
onTagAttribute
Property | Type | Description |
---|
attribute | String | Name of the attribute in this element you want to process, e.g. action |
format | enum | Conversion to apply on the matching parts with ’toVar’ or ’toArray’ shortcuts. Options:BYTEBUF Store the buffer directly. Beware that this may cause memory leaks!BYTES Store data as byte array.STRING Interprets the bytes as UTF-8 string.
|
processor | Processor.Builder | Add one or more processors. |
tag | String | Name of the tag this handler should look for, e.g. form |
toArray | String | Shortcut to store selected parts in an array in the session. Must follow the pattern variable[maxSize] |
toVar | String | Shortcut to store first match in given variable. Further matches are ignored. |
22 - publishAgentData
Makes the data available to all sessions in the same agent, including those using different executors.
Makes the data available to all sessions in the same agent, including those using different executors.
Inline definition |
---|
Both name of source variable and the key used to read the data. |
Property | Type | Description |
---|
fromVar | String | Source session variable name. |
name | String | Arbitrary unique identifier for the data. |
23 - publishGlobalCounters
Gathers values from session variables and publishes them globally (to all agents).
Gathers values from session variables and publishes them globally (to all agents).
You can name the counters individually (example 1) or use the variable names (example 2):
<code>
# Example 1:
- publishGlobalCounters:
key: myKey
vars: [ foo, bar ]
# Example 2:
- publishGlobalCounters:
key: someOtherKey
vars:
- foo: myFoo
- bar: bbb
</code>
Property | Type | Description |
---|
key | String | Identifier of the global record. |
vars | Builder | List of names and session variables. |
vars
Property | Type | Description |
---|
<any> | <unknown> | <no description> |
<list of strings> | <unknown> | <no description> |
24 - queue
Stores defragmented data in a queue.
Stores defragmented data in a queue.
For each item in the queue a new sequence instance will be started (subject the concurrency constraints) with sequence index that allows it to read an object from an array using sequence-scoped access.
Property | Type | Description |
---|
concurrency | int | Maximum number of started sequences that can be running at one moment. |
format | enum | Conversion format from byte buffers. Default format is STRING. Options:BYTEBUF Store the buffer directly. Beware that this may cause memory leaks!BYTES Store data as byte array.STRING Interprets the bytes as UTF-8 string.
|
maxSize | int | Maximum number of elements that can be stored in the queue. |
onCompletion | Action.Builder | Custom action that should be performed when the last consuming sequence reports that it has processed the last element from the queue. Note that the sequence is NOT automatically augmented to report completion. |
sequence | String | Name of the started sequence. |
var | String | Variable storing the array that it used as a output object from the queue. |
25 - readAgentData
Reads data from agent-wide scope into session variable.
Reads data from agent-wide scope into session variable.
The data must be published in a phase that has terminated before this phase starts: usually this is achieved using the startAfterStrict
property on the phase.
Inline definition |
---|
Both the identifier and destination session variable. |
Property | Type | Description |
---|
name | String | Unique identifier for the data. |
toVar | String | Destination session variable name. |
26 - removeItem
Removes element from an array of variables.
Removes element from an array of variables.
Property | Type | Description |
---|
fromVar | String | Variable containing an existing array of object variables. |
index | Builder | Set index at which the item should be removed. Elements to the right of this are moved to the left. |
index
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
27 - restartSequence
Schedules a restart of this sequence.
Schedules a restart of this sequence.
28 - set
Set variable in session to certain value.
Set variable in session to certain value.
Inline definition |
---|
Use var <- value . |
Property | Type | Description |
---|
intArray | Builder | Set variable to an (unset) integer array. |
objectArray | Builder | Set variable to an (unset) object array. |
value | String | String value. |
var | String | Variable name. |
intArray
Creates integer arrays to be stored in the session.
Property | Type | Description |
---|
fromVar | String | Contents of the new array. If the variable contains an array or a list, items will be copied to the elements with the same index up to the size of this array. If the variable contains a different value all elements will be initialized to this value. |
size | int | Size of the array. |
objectArray
Creates object arrays to be stored in the session.
Property | Type | Description |
---|
fromVar | String | Contents of the new array. If the variable contains an array or a list, items will be copied to the elements with the same index up to the size of this array. If the variable contains a different value all elements will be initialized to this value. |
size | int | Size of the array. |
29 - setInt
Set session variable to an integral value.
Set session variable to an integral value.
Inline definition |
---|
Use var <- value . |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
intCondition | Builder | Set variable only if the current value satisfies certain condition. |
max | Builder | Set to value that is the maximum of this list of values. |
min | Builder | Set to value that is the minimum of this list of values. |
onlyIfNotSet | boolean | Set variable to the value only if it is not already set. |
value | int | Value (integer). |
var | String | Variable name. |
intCondition
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. |
intCondition.equalTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.greaterOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.greaterThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.lessOrEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.lessThan
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
intCondition.notEqualTo
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
max
max.<list of mappings>
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
min
30 - setItem
Set element in a collection on given position.
Set element in a collection on given position.
Property | Type | Description |
---|
fromVar | String | Fetch value from session variable. |
index | Builder | Integer session variable with an index into the collection. |
toVar | String | Session variable with the collection. |
value | String | Verbatim value. |
index
Inline definition |
---|
Uses the argument as a constant value. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
value | int | Value (integer). |
31 - setSharedCounter
Sets value in a counter shared by all sessions in the same executor.
Sets value in a counter shared by all sessions in the same executor.
Inline definition |
---|
Both the name of the counter and variable name. |
Property | Type | Description |
---|
fromVar | String | Input variable name. |
key | String | Identifier for the counter. |
value | int | Value (integer). |
32 - store
Stores data in a session variable (overwriting on multiple occurences).
Stores data in a session variable (overwriting on multiple occurences).
Inline definition |
---|
Variable name. |
Property | Type | Description |
---|
format | enum | Format into which should this processor convert the buffers before storing. Default is STRING . Options:BYTEBUF Store the buffer directly. Beware that this may cause memory leaks!BYTES Store data as byte array.STRING Interprets the bytes as UTF-8 string.
|
toVar | Object | Variable name. |
33 - storeInt
Converts buffers into integral value and stores it in a variable.
Converts buffers into integral value and stores it in a variable.
Inline definition |
---|
Name of integer variable where to store the value. |
Property | Type | Description |
---|
override | boolean | Allow the value to be set multiple times (last write wins). Defaults to false. |
toVar | String | Name of variable where to store the integral value. |
34 - stringToInt
Parse string into integer and store it in a variable.
Parse string into integer and store it in a variable.
If the parsing fails the target variable is not modified.
Inline definition |
---|
Use fromVar -> toVar |
Property | Type | Description |
---|
fromVar | String | Source variable name. |
toVar | String | Target variable name. |
35 - unset
Undefine variable name.
Undefine variable name.
Inline definition |
---|
Variable name. |
Property | Type | Description |
---|
var | Object | Variable name. |