????LoadRunner??дsocket?????????
???????????? ???????[ 2014/8/4 15:03:34 ] ??????????????? ???????
??????????????
//--------------????????-----------------
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)?????????????????????????
??????
??????????????????????????????????APP?????????????????????????????????????????SQL??????????????Щ????????????????????????????????????????????????????????????????????????Web????????????????????????????????????????????????????漰????????????????????????????????Java???????????Щ??????????????????????????????????????????????????????????????
???·???
??????????????????
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 ??????