Define a push message
A push message is a Container of actions that defines actions or transactions to be executed when the message is received.
A message is defined by the list of conditions that must be fulfilled for it to be executed. When a server response is received through the push channel, NeoLoad applies the message rules that have been defined and executes the messages for which the conditions are fulfilled.
There are three types of execution conditions:
- Classname
This option is only available for XML (AMF, RTMP, and RTMPT) -type push frameworks. The message executes if a response object is of the specified class type. Where the response object is a table or collection, NeoLoad checks each of the top-level children.
Where the object is a Container recognized by the framework, the algorithm is applied on the contained object and not on the envelope.
- Default
The message executes if no other message has been executed for the response. A default message is not compulsory in a push request definition. If several default messages are defined for a same request, they will all be executed if no other message fulfills the conditions.
- Conditions
The message is executed if the conditions are fulfilled.
The ${NL-MessageContent} variable is created automatically when a server response is received and contains the character string representing the response. In the case of a polling request, a response may contain several sub-responses (for example, if the server has accumulated several updates between two polling requests). In this case, NeoLoad separates out each of the sub-responses. Each sub-response is then processed as a separate response and the ${NL-MessageContent} variable contains a sub-response to each successive call.
A condition comprises two operands and an operator. The operators are as follows:
- is equal to - true if the two operands have the same value
- is not equal to - true if the 2 operands do not have the same value
- contains - true if operand1 contains operand2
- doesn't contain - true if operand1 does not contain operand2
- starts with - true if operand1 starts with operand2, including where the 2 operands are equal.
- doesn't start with - true if operand1 does not start with operand2.
- ends with - true if operand1 ends with operand2, including where the 2 operands are equal.
- doesn't end with - true if operand1 does not end with operand2.
- matches the regular expression - true if operand1 matches the regular expression for operand2.
- doesn't match the regular expression - true if operand1 does not match the regular expression for operand2.
- is greater than - true if operand1 is greater than operand2.
- is greater than or equal to - true if operand1 is greater than, or equal to, operand2.
- is less than - true if operand1 is less than operand2.
- is less than or equal to - true if operand1 is less than, or equal to, operand2.
- exists - true if operand one is the name of a variable that does not have a nil value. Operand2 cannot be defined.
- Doesn't exist - true if operand1 does not correspond to a variable name or if operand1 corresponds to a variable name with a nil value. Operand2 cannot be defined.
Each operand may be either a ${variableName} variable or a static string. In the case of the exists operator, operand1 can only be a variableName variable name.
Several conditions may be used in a push message. To add a condition, click on the + button under the conditions table. You then need to configure whether the action is executed if all the conditions are true (Match any of the following), or if at least one of the conditions is true (Match all of the following).
Home