???????????????LOADRUNNER????????????????????????????????????LOADRUNNER?????????????????ж??????????????ж???????й????н????????????г????
????1.???????????????????????
?????????????????????????????????в?????????2??????????????????????????????y??????3?Σ??????????????????????????????????????????ж????????????????????TR_LOGIN????????????????н???
????????????????????????TR_LOGIN???????
????????????????????????TR_LOGIN???????
????????????????????????TR_LOGIN???????
?????????TR_LOGIN?????????????????
??????????????????????????????????????????????????????????????????????????
???????????????????LOADRUNNER?????mercuryWebTours
????????????????????????????????????????????????????????£?????????????е?????????????????

Action()
{
double trans_time;
int status;
web_url("mercuryWebTours"??
"URL=http://127.0.0.1:1080/mercuryWebTours/"??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t1.inf"??
"Mode=HTML"??
LAST);
lr_start_transaction("tr_login");
trans_time=lr_get_transaction_duration( "tr_login" );
//lr_get_transaction_duration??????????????????????????????
web_reg_find("Text=Error"??
"SaveCount=login_Count"?? LAST);
//web_reg_find???????????????????Χ???????????????????????????????????WEB_FIND?????????????????????savecount?????????????????Χ???????????????????????????????????????????ж??????????????????
//?????????????????????????“ERROR”???????????????????????????????????????????????ж?????????????????????????????????????????????????????
status = web_submit_form("login.pl"??
"Snapshot=t2.inf"??
ITEMDATA??
"Name=username"?? "Value={name}"?? ENDITEM??
"Name=password"?? "Value={password}"?? ENDITEM??
"Name=login.x"?? "Value=51"?? ENDITEM??
"Name=login.y"?? "Value=12"?? ENDITEM??
LAST);
//?????web_submit_form??????е???????status???????????????????0??????????????0????
if (status == 0) //??????
lr_end_transaction("tr_login"?? LR_PASS);//?????????????????????PASS
else
lr_end_transaction("tr_login"?? LR_FAIL);//????????????????????FAIL
if (trans_time) //??????????????????????????
lr_output_message("tr_login?????? %f ??"?? trans_time);
else            //???????????????????????????????
lr_output_message("The duration cannot be determined.");
if (atoi(lr_eval_string("{login_Count}")) > 0){
//??????????????????“ERROR”???????????????????????
lr_error_message("Login failed");
}
else{
//?????????
lr_output_message("Login successful.");
return(0);
}
return 0;
}
 
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????