Load Test XML variables are initialized as a result of searching a response document for user-specified criteria. Any pattern appearing within the XML node would be used to initialize the value of the XML Load Test variable.

Adding XML Parameter

The following fields need to be filled to add XML parameters in the script.

Parameter Details

Select Pages for XML Parameter

The user can specify on which response page he/she wants to apply the XML parameter. Users can select any one of the following options:

After filling in the above fields, you have to select any one of the following:

Find : It has two options:

After selecting any one of the above, we can add Selection Criteria.  When the user clicks on Add Selection Criteria, a Where clause is added. User can select either node or attribute with value and Value with key respectively. User can add multiple conditions according to their requirement.

Advanced

The user will get the following fields in Advanced:

Occurrence Count (ORD)

It provides the number of times the searched string appears on the answer document (within the defined left and right boundary). It comes in handy when the same left and right boundaries occur on a response page several times. User can select any one of the following as per the requirement from the drop-down:

After selecting one of the above options, we have the following checkbox:

Conversion

It is used to encode the search pattern. You will get the following option:

Example- HTML-encoded data: <03/01/1987>

After conversion into plain data: <03/01/1987>

Example- plain HTML data: <03/01/1987>

After conversion into URL encoded data: %26lt%3B03%2F01%2F1987%26gt%3B

Example: Plain HTML data: <03/01/1987>

After conversion into base64 encoded data: ICAmbHQ7MDMvMDEvMTk4NyZndDsgIA==

Redirection Depth

If RedirectionDepth=Last is specified and the server response is redirection information (HTTP status code 300-303, 307), then the response is not searched. Instead, after receiving a redirection response, the GET request is sent to the redirected location and the search is performed on the response from that location. This attribute is optional. Empty RedirectionDepth is not allowed. Default value is Last.

Action on not Found:

It is the handling option when a boundary is not found and an empty string is generated.

Encoding Option

Encoding is used to encode special characters to their ASCII value.

Users can encode any number of special characters i.e. all, specific, or none. Users can have the following options:

Encode Space By: This option specifies to Load Test how to encode Space. User can have two options: ‘+’ or ‘%20’. If ‘+’ is chosen, Load Test encodes Space by ‘+’ and if ‘%20’ is chosen, Load Test encodes Space by ‘%20’. The default value is ‘+’.

Notes :

  1. If your values contain special characters that you prefer not to encode, you have the choice of using either "Do not encode special characters" or "Encode only specified characters." A practical illustration of this situation can be found in the domain name https://www.cavisson.com, which includes special characters such as (:/).