The use of LoadRunner correlation function to associate web_reg_save_param with loadruner
The following examples introduce the use of LoadRunner correlation function, I hope it will be helpful to you.
Use of web_reg_save_param and associations
1. Function: save dynamic data. The source of this data is html source code.
two。 Use
Order: web_reg_save_param ()
Web_submit_data ()
Lr_message ()
Properties of 3.web_reg_save_param ()
1) when looking for dynamic data, the scope of the data can be limited by the left boundary and the right boundary. Namely: LB,RB two attributes.
Portion of string to save to parameter
LB
RB
Entire string
Empty
Empty
A string delimited by boundaries
Boundary
Boundary
The beginning of a string until the first right boundary
Empty
Boundary
The last left boundary until the end
Boundary
Empty
Source loadrunner help documentation
Where LB/IC is the case of ignored characters.
2) ORD attribute
Is to save the found dynamic variables to an array. The default is ord=1. If you search for multiple characters and want to save them in an array, ord=all; them to pr_1 pr_2. Where pr_count is an internal function and counts the number of arrays.
3) search attribute
Sets the scope of the search, which can be header,body,header and body,html body.
4) SaveOffset attribute
Offset. From the searched string, take the substring. Default saveoffset=0.
5) SaveLen attribute
Take the length of the string. Also from the search string, take the substring.
4. Example:
1)
Char * pr
Web_reg_save_param ("pr", "LB=pr", "RB="
", LAST)
Web_submit_data ("pr.php"
"url= http://"
"TargerFrame="
.
LAST)
Lr_message ("value:% s", lr_eval_string ("{pr}"))
Then you can see the results in the running log.
2) examples of relevance
Char * pr
Web_reg_save_param ("pr", "LB=pr", "RB="
", LAST)
Web_submit_data ("pr.php"
"url= http://"
"TargerFrame="
.
LAST)
I=atoi (pr_count)
This function is quite useful. I hope to get everyone's attention.
Use of web_reg_save_param and associations
1. Function: save dynamic data. The source of this data is html source code.
two。 Use
Order: web_reg_save_param ()
Web_submit_data ()
Lr_message ()
Properties of 3.web_reg_save_param ()
1) when looking for dynamic data, the scope of the data can be limited by the left boundary and the right boundary. Namely: LB,RB two attributes.
Portion of string to save to parameter
LB
RB
Entire string
Empty
Empty
A string delimited by boundaries
Boundary
Boundary
The beginning of a string until the first right boundary
Empty
Boundary
The last left boundary until the end
Boundary
Empty
Source loadrunner help documentation
Where LB/IC is the case of ignored characters.
2) ORD attribute
Is to save the found dynamic variables to an array. The default is ord=1. If you search for multiple characters and want to save them in an array, ord=all; them to pr_1 pr_2. Where pr_count is an internal function and counts the number of arrays.
3) search attribute
Sets the scope of the search, which can be header,body,header and body,html body.
4) SaveOffset attribute
Offset. From the searched string, take the substring. Default saveoffset=0.
5) SaveLen attribute
Take the length of the string. Also from the search string, take the substring.
4. Example:
1)
Char * pr
Web_reg_save_param ("pr", "LB=pr", "RB="
", LAST)
Web_submit_data ("pr.php"
"url= http://"
"TargerFrame="
.
LAST)
Lr_message ("value:% s", lr_eval_string ("{pr}"))
Then you can see the results in the running log.
2) examples of relevance
Char * pr
Web_reg_save_param ("pr", "LB=pr", "RB="
", LAST)
Web_submit_data ("pr.php"
"url= http://"
"TargerFrame="
.
LAST)
I=atoi (pr_count)
This function is quite useful. I hope to get everyone's attention.