????LoadRunner??дsocket?????????
???????????? ???????[ 2016/11/18 11:43:12 ] ??????????????? ??? socket
????????????????
lrs_free_buffer ??????????????????
lrs_get_buffer_by_name ??????????л?????????????С
lrs_get_last_received_buffer ????????????????????????????С
lrs_get_last_received_buffer_size ?????????????????????????????С
lrs_get_received_buffer ?????????????????????????
lrs_get_static_buffer ?????????????????????
lrs_get_user_buffer ?????????????????????
lrs_get_user_buffer_size ??????????????????С
lrs_set_send_buffer ??????????????????????
??????????????
????lrs_cleanup ???Windows????? DLL ?????
????lrs_startup ????? Windows ????? DLL
??????????亯????
????lrs_save_param ??????????????????????????????????浽??????
????lrs_save_param_ex ???????????????????????????????????????浽??????
????lrs_save_searched_string ???????????????????????????????????????????????????????????浽??????
?????????????
????lrs_ascii_to_ebcdic ????????????? ASCII ???????? EBCDIC ???
????lrs_decimal_to_hex_string ???????????????????????????
????lrs_ebcdic_to_ascii ????????????? EBCDIC ????????ASCII ???
????lrs_hex_string_to_int ??????????????????????
???????????????????????????????????socket??Ч???
????lrs_set_accept_timeout ?????????????ó??
????lrs_set_connect_timeout ??????????????ó??
????lrs_set_recv_timeout ???lrs_receive????????????????????????????????????????????
????lrs_set_recv_timeout2 ?????????????????????????????????????????????????lrs_receive??????????????????????????б?????????????????????′?????????????????????????
????lrs_set_send_timeout ?????????????????ó??
??????????????
?????????????????????????????????дsocket????????????????????????Э?飬????????????
?????????
//????????????
char * ActualBuffer="";
//??????????????м?????
int numberOfResponse = -1;
//???????????????ж??
int rc = 0;
//???????????????ж??
int msgOk=-1;
//?????????
char * position="";
//???????????????
char * passMsg="succee";
????????????
//--------------????????-----------------
rc= lrs_create_socket("socket0"?? "TCP"?? "LocalHost=0"?? "RemoteHost=<RemoteHost>"?? LrsLastArg);
if (rc==0){
//?ж?????????????
lr_output_message("Socket was successfully created ");
}
else{
lr_output_message("An error occurred while creating the socket?? Error Code: %d"?? rc);
}
//--------------????????-----------------
???????Э??
lrs_send("socket0"?? "buf0"?? LrsLastArg);
//??“socket0”????"buf0"
lrs_set_receive_option(EndMarker?? BinaryStringTerminator?? "</html>");
//???y???Э???????"</html>"????????Э???????????????????е?lrs_receive?????log??????Waiting for writable socket 10
//secs?? 0 usecs??????????10?????????????????????data.ws?ж?????recv buffer???????????????100??????socket??????buffer?????
//??100???????loadrunner?????????????????????????100??buffer????????
lrs_receive("socket0"?? "buf1"??"Flags=MSG_PEEK "?? LrsLastArg);
//??“socket0”?з???????????“buf1”??
????????????
????????????????????????buf0??buf1??????????????????????????data.ws?б????????????????
????;WSRData 2 1
????send buf0 5120
????"<??????>"
????recv buf1 1024
????-1
????5120????????socketЭ?鴫???????????м??????????????????
????"<??????>"???buf0????????????????loadrunner??httpЭ???????{}?????socketЭ???????????<>??????????
????????????ж?
??????????????????????????“buf1”?е??Щ???????????????????
//????????????????????????????С
lrs_get_last_received_buffer("socket0"??&ActualBuffer??&numberOfResponse);
//???????????????
position = (char *)strstr(ActualBuffer?? passMsg);
// strstr has returned the address. Now calculate * the offset from the beginning of str
msgOk = (int)(position - ActualBuffer + 1);
if(msgOk>0){
lr_end_transaction("?????????"?? LR_PASS);
lr_output_message("???ν????%s"??ActualBuffer);
}
else{
lr_end_transaction("?????????"?? LR_FAIL);
lr_error_message("???ν????%s"??ActualBuffer);
}
???????
//--------------???socket--------------
lrs_disable_socket("socket0"?? DISABLE_SEND_RECV);
//--------------???socket--------------
lrs_close_socket("socket0");
???????????
?????????????????Loadrunner??дsocket??????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???loadrunner????????????????????????LoadRunner????loadrunner11????????????????????????LoadRunner??Ajax?????У??LoadRunner???????????LoadRunner??????????????LoadRunner??????????????????loadrunner11??java vuser????jar?????LoadRunner???Windows???LoadRunnerС???????LoadRunner????:????????????????loadrunner??????????????????LoadRunner?ж?????????????????LoadRunner?ж?Https????????Loadrunner?????-Vuser??????LoadRunner??????APP???
???·???
??????????????????
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????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????