LoadRunner FAQ
???????????? ???????[ 2014/4/11 16:31:18 ] ????????LoadRunner ????
????LR?в???????????
????1.????????????
????lr_save_string("hello world"??"param");
????lr_eval_string("{param}");
????2.??????????
int x;
char *y;
y="hello";
x=10;
lr_save_int(x??"param");
lr_save_string(y??"param1");
lr_eval_string("{param}");
lr_eval_string("{param1}");
????3.??????????
char x[100];
x="{param}";
lr_save_string("hello world"??"param");
lr_eval_string(x);
????LR????????????
Action()
{
//??????????????????????????С
int flen;
//??????????
long filedes;
//???????·?????????
char file[256]="/0";
//????????????
char * strNumber;
//Returns the string argument after evaluating embedded parameters.
strNumber=lr_eval_string("{RandomNum}");
//??·?????浽file??????
strcat(file??"D://Excel//");
//????????????????file???????
strcat(file??strNumber);
//???????????????.rar?????file???????
strcat(file??".rar");
//?????????LoadRunner??????????????????????
//???ò???????????????????????????С
web_set_max_html_param_len("20000");
//??ù???????????????????????????????????????磬??÷??????????????????
web_reg_save_param("fcontent"??
"LB="??
"RB="??
"SEARCH=BODY"??
LAST);
lr_start_transaction("??????????");
//????????????????????
web_url("DownLoadServlet"??
"URL=https://testserver3/servlet/DownLoadServlet?filename=help"??
"Resource=1"??
"RecContentType=application/x-msdownload"??
"Referer="??
"Snapshot=t41.inf"??
LAST);
//???????е????????
flen = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
if(flen > 0)
{
//??д????????
if((filedes = fopen(file?? "wb")) == NULL)
{
lr_output_message("????????!");
return -1;
}
//д?????????
fwrite(lr_eval_string("{fcontent}")?? flen?? 1?? filedes);
//??????
fclose(filedes);
}
lr_end_transaction("??????????"??LR_AUTO);
return 0;
}
??????ν???????????
????VuGen????????????????????????????correlation???????
????1. ???????
????2. ???????
???????????
????VuGen?????????????棨auto-correlationengine???????????????????????????????????ù???????????????????????????
????RuleCorrelation
???????????RecordingOptions??>??InternetProtocol??>??Correlation???????ù??????????????Щ????????????VuGen?????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11