web_reg_save_param

web_reg_save_param

web_reg_save_param is the most important function used in load runner. It is used to capture the dynamic values sent by the server in the application and pass to the next request.

Syntax :

web_reg_save_param("Parameter_name", "LB=Left boundary", "RB=Right boundary", LAST);

These are the most important attributes of web_reg_save_param function which is used.

web_reg_save_param

Below are the list of all the attributes present in the function.

Parameter Name:

  • It store the dynamic values in the specified variable which is found using the attribute.

LB:

  • Left boundary of the dynamic value which we need to capture.
  • If the LB is empty, then it will capture all the characters from the starting of the boundary.
  • It is case sensitive, therefore when you are specific the boundary make sure they are exactly same as it is displayed.
  • One can further customize the search text, by using one or more text flags.
  • Its the most important attribute is mandatory.

RB:

  • Right boundary of the dynamic value which we need to capture.
  • If the RB is empty, then it will capture all the characters from the starting of the boundary.
  • It is case sensitive, therefore when you are specific the boundary make sure they are exactly same as it is displayed.
  • One can further customize the search text, by using one or more text flags.
  • Its the most important attribute is mandatory.

ORD:

  • It will Indicates the ordinal position of the dynamic value or instance of the match of the value.
  • If you specify as "All," it saves the parameter values in an array.
  • Default value of the instance is 1.
  • This attribute is optional.

Search:

  • It specify where to search for the delimited value in the response.
  • It has different values such as.
    • Headers (Search only the headers).
    • Body (search only body data, not headers).
    • No resource (search only the HTML body, excluding all headers and resources).
    • ALL (search body, headers, and resources).
  • Importantly the default value is ALL.
  • This attribute is optional but generally preferred.

NOTFOUND :

  • It used to handle when the boundary is empty string in the response.
  • "Not found=error" is the the default value. It will raise the error when a boundary is not found.
  • "Not found=warning" does not raise an error. Therefore "warning" option is ideal if you want to see if the string was found and you do not want the script to fail.
  • This attribute is optional as well.

RelFrameID :

  • It specific the hierarchy level of the HTML page which is related to the requested URL.
  • Default value is ALL.
  • This attribute is optional.

SaveLen :

  • Length of the sub-string where the value is found, from the specified offset, to save into parameter.
  • Default value is -1, indicating to save to the end of the string.
  • This attribute is optional.

SaveOffset:

  • Offset of a sub-string where the value is found, to save into parameter.
  • Value must be non-negative.
  • Default value is 0.
  • This attribute is optional.

Ignore Redirections:

  • If you set the attribute "Ignore Redirections=Yes", then if the server response contains any redirection information like (HTTP status code 300-303, 307). The response is not searched. Instead, once the redirection response is received, the GET request is sent to the redirected location. And the search is performed.
  • Therefore the default value is "Ignore Redirections=No".
  • This attribute is optional.

Leave a Reply

Your email address will not be published. Required fields are marked *