LoadRunnerС???????
????????? ???????[ 2017/4/11 14:38:26 ] ?????????????????? LoadRunner
????1?????????а?????????????????????
?????????????е?Support charset???UTF-8
????????????л?????????У????????????檔??????PageView??????????????????????????л???Server Response?У????е???????????????????“?????”??
???????????????????а??????????????gb2312
??????IIS?????Web.Config???????<system.web>….</system.web>?????<globalization requestEncoding="gb2312" responseEncoding="gb2312" fileEncoding="gb2312"/>??????????????????????
????2???????????????
?????п?????????????URL??????????localhost?????????????IP?????127.0.0.1?????
????3?????????????????????web_reg_find?????TextPfx??TextSfx?л???????????????????壨??б????????磺
????web_reg_find("Search=Body"??
????"SaveCount=Welcome"??
????"TextPfx=???<a class="drop" id="viewpro" onMouseOver="showMenu(this.id)">"??
????"TextSfx=</a>"??
????LAST);
????4?????web_image_check?????????????????????Run-Time Setting?е?Enable Image and text check???
???????web_find????????????????????????????
????5???????????????????????????????????????????????????к????????????У?
??????1????дSQL?????????????
??????2?????DataFactory?????????????????
??????3?????LoadRunner???????????????????????????
????Tips:
???????DataFactory????nchar???????????????????????????????????????????????????????????????????????
????6???????????????в???????????????????????????
????7??LoadRunner??????????????????????????????
???????????1????
????????????Run-Time Settings – Browser – Browser Emulation – User-Agent
???????????IE??
????????????????“??????”??Unicode??UTF-8????
???????????2????
???????lr_convert_string_encoding?????????????
??????????????????????
lr_convert_string_encoding(lr_eval_string("{ReplyContents}")??LR_ENC_SYSTEM_LOCALE??LR_ENC_UTF8??"ReplyMessage");
web_submit_data("postreply.aspx_2"??
"Action=http://127.0.0.1/postreply.aspx?infloat=1&topicid=2&&inajax=1"??
"Method=POST"??
"EncType=multipart/form-data"??
"RecContentType=text/xml"??
"Referer=http://127.0.0.1/showtopic-2.aspx"??
"Snapshot=t9.inf"??
"Mode=HTML"??
ITEMDATA??
"Name=iconid"?? "Value=0"?? ENDITEM??
"Name=title"?? "Value="?? ENDITEM??
"Name=wysiwyg"?? "Value=0"?? ENDITEM??
"Name=checkbox"?? "Value=0"?? ENDITEM??
"Name=message"?? "Value=[localimg=180??112]1[/localimg]
{ReplyMessage}"?? ENDITEM??
"Name=e_mediatyperadio"?? "Value=on"?? ENDITEM??
"Name=sl_attachdesc"?? "Value="?? ENDITEM??
"Name=attachid"?? "Value="?? ENDITEM??
"Name=attachdesc"?? "Value="?? ENDITEM??
"Name=localid"?? "Value="?? ENDITEM??
"Name=attachdesc"?? "Value="?? ENDITEM??
"Name=localid"?? "Value=1"?? ENDITEM??
"Name=attachdesc"?? "Value="?? ENDITEM??
"Name=localid"?? "Value=2"?? ENDITEM??
"Name=emailnotify"?? "Value=on"?? ENDITEM??
"Name=postreplynotice"?? "Value=on"?? ENDITEM??
"Name=postfile"?? "Value="?? "File=Yes"?? ENDITEM??
"Name=postfile"?? "Value=D:\\?????\\It's about time.JPG"?? "File=Yes"?? ENDITEM??
"Name=postfile"?? "Value="?? "File=Yes"?? ENDITEM??
"Name=uploadallowmax"?? "Value=10"?? ENDITEM??
"Name=uploadallowtype"?? "Value=jpg??gif"?? ENDITEM??
"Name=thumbwidth"?? "Value=300"?? ENDITEM??
"Name=thumbheight"?? "Value=250"?? ENDITEM??
"Name=noinsert"?? "Value=0"?? ENDITEM??
LAST);
????8????????LR????????????????????????????????????
????The parameter file is stored in the script directory as .dat file extension. It can be opened with a simple text editor like Notepad as it is stored in pure text format. Therefore?? you can manipulate the files via the Notepad. You can also use office applications such as Microsoft Excel or OpenOffice.org Calc to work on the file. This greatly the amount of work required for maintaining a long list of data.
????9??LR9.x???VUGen????"Failed to connect to server"
????After upgrading to LoadRunner 9.x I started getting a window popup which said "Failed to connect to server" every time I opened virtual user generator (vugen.exe).
????The solution to this was to close virtual user generator and delete the [vugen.ini] file.
????vugen.ini is found in the %systemroot% folder on your Windows PC (usually C:WINDOWS or C:WINNT).
????Once you've deleted the file?? virtual user generator will open without any issues and create a new vugen.ini file automatically.
????10??????????????????????value??
????????????????????????value?????磺
????stateID="d7lg0ehmjkkm6uin3s4boei7oq">
????stateID="cvopakp46ftsf8mh6l37ti3ubm">
????stateID="bv9mja8gtgr39ddibm5t9163re">
????web_reg_save_param???ORD????????????
????ORD: Indicates the ordinal position or instance of the match. The default instance is 1. If you specify "All??" it saves the parameter values in an array.
?????????
char outFlightParam[50]; // The name of the parameter for correlation
char outFlightParamVal[50]; // The formatted value of outFlightParam
web_reg_save_param("outFlightVal"??
"LB=outboundFlight value="?? "RB=>"??
"ORD=ALL"??
"SaveLen=18"??
LAST);
web_submit_form("reservations.pl"??
"Snapshot=t4.inf"??
ITEMDATA??
"Name=depart"?? "Value=London"?? ENDITEM??
"Name=departDate"?? "Value=11/20/2003"?? ENDITEM??
"Name=arrive"?? "Value=New York"?? ENDITEM??
"Name=returnDate"?? "Value=11/21/2003"?? ENDITEM??
"Name=numPassengers"?? "Value=1"?? ENDITEM??
"Name=roundtrip"?? "Value=<OFF>"?? ENDITEM??
"Name=seatPref"?? "Value=None"?? ENDITEM??
"Name=seatType"?? "Value=Coach"?? ENDITEM??
"Name=findFlights.x"?? "Value=83"?? ENDITEM??
"Name=findFlights.y"?? "Value=16"?? ENDITEM??
LAST);
sprintf(outFlightParam?? "{outFlightVal_%s}"??
lr_eval_string("{outFlightVal_count}"));
sprintf(outFlightParamVal?? "Value=%s"??
lr_eval_string(outFlightParam));
lr_message("The value argument is : %s"?? outFlightParamVal);
web_submit_form("reservations.pl_2"??
"Snapshot=t5.inf"??
ITEMDATA??
"Name=outboundFlight"??outFlightParamVal?? ENDITEM??
"Name=reserveFlights.x"?? "Value=92"?? ENDITEM??
"Name=reserveFlights.y"?? "Value=10"?? ENDITEM??
LAST);
????11?????г???????“Step download timeout (120 seconds) has expired when downloading resource(s)”
????vuser_init.c(12): Error -27728: Step download timeout (120 seconds) has expired when downloading non-resource(s)?????????????????
????vuser_init.c(12): Error -27727: Step download timeout (120 seconds) has expired when downloading resource(s). Set the "Step Timeout caused by resources is a warning" Run-Time Setting to Yes/No to have this message as a warning/error?? respectively
????????????????????泬??2????????????????????Run-Time?????????Preferences->Options?????Step download timeout(sec)?????
?????????“Step timeout caused by resources is a warning”?????Yes??????????????????????????棬??????????????????????????????????????????????????
????12????strtok????????????
?????????loadrunner??????“15”???????????????????????????????????
????//Body response ????? <BODY><; PRE>//OK[8??7??5??15??6??5??0??4??0??3??0??3??2??0??0??0??1
??????web_reg_save_param???“8??7??5??15??6??5??0??4??0??3??0??3??2??0??0??0??1”????Σ??????strtok?????и????????????????????????????
???????磺
extern char * strtok(char * string?? const char * delimiters ); // Explicit declaration
char separators[] = "??";
char * token;
lr_save_string("1??2??3??4??5??6"??"str");
token = (char *)strtok(lr_eval_string("{str}")?? separators); // Get the first token
if (!token) {
lr_output_message ("No tokens found in string!");
return( -1 );
}
while (token != NULL ) { // While valid tokens are returned
lr_output_message ("%s"?? token );
token = (char *)strtok(NULL?? separators); // Get the next token
}
????13??LoadRunner??й???webserviceЭ???license?????http???????????????httpЭ?????webservice??
??????????ο???
????http://blog.testsautomation.com/2009/01/web-services-performance-using-loadrunner/
????http://blog.testsautomation.com/2009/05/validating-web-service-response-with-xpath/
????14????????????в??????????????????????????????????LR?????????????????????
??????analysis????????????????????а??????????????????????ü????
????15??LoadRunner?????й????????1?????????
????Another issue that I’m facing from time to time is that LoadRunner stops 50% of running users without any notification?? issue?? error message etc. I’ve find out that it happens only when running with log level set to ‘always send a message’. Because of that?? I suggest to run with log level set to ‘Send message only when error occur’.
????16??LoadRunner???????κζ???
????Sometimes LoadRunner is not recording anything while browsing using IE. I have no idea why but the fastest solution is to restart whole LR. Maybe some of you have good explanation for that?
????17??????RTMPЭ???????LoadRunner?????Э????????
??????flexЭ??
???????????????????
????flex_rtmp_connect Connects a client to an RTMP server and sets connection options.
????flex_rtmp_disconnect Disconnects a client from an RTMP server.
????flex_rtmp_send Sends messages to an RTMP server.
????flex_rtmp_receive Receives responses from an RTMP server
????Flex can record and replay scripts involving RTMP (Real Time Messaging Protocol). In order to enable RTMP simulation?? you must configure the recording options for the Flex protocol.
????To enable RTMP:
????1 Open the Recording Options dialog box by selecting Tools > Recording Options or clicking the Options button in the Start Recording dialog box.
????2 In the Network > Port Mapping node click Options.
????3 Set the Send-Receive buffer size threshold to 1500.
????18???????LoadRunner??????QTP?????
????1???????????
????1?????QTP??Tools--Options--Run??"Alow other Mercury products to run tests and components"
????2??????????lr?????е?QTP???????????QTP?????????????Services.StartTransaction "start"??Services.EndTransaction "start"
????2??????QTP???
??????LR??????????QTP??????QTP???????????????????.usr???????
???????LR??????QTP??????????????Vuser???????????
????The load generator is currently running the maximum number of Vusers of this type
????19????LR????κ???Socket????????????
??????LR?ж?Socket??????????????LR??????ж?lrs_receive????????????????????????????????????????????(??????????????????????????)???????????????????????????????????????????(??*???????????)??
?????????????
????recv buf1 12
????"Hello?? Denny"
?????????
????recv buf1 *
????"Hello?? Denny"
???????OK??
????20??LoadRunner9.5??Controller?в??????Apache????
??????C:Program FilesHPLoadRunnerdatonline_graphs?????online_resource_graphs.rmd????????[Apache]?????е?EnableInUI?1
?????ο???
????http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1274450165814+28353475&threadId=1229523
????21??VB Vuser????ADO????????“user-defined type not defined”
????????VB Vuserд???????????????????????VB Vuser???????????????
????Private m_Conn As ADODB.Connection '???????
????Private m_Reco As ADODB.Recordset '?????
??????????VB Vuser?в???????????????user-defined type not defined
?????????Run-Time ?????е?VBA?????ADO??????
?????????VB Script???????????????????????CreateObject??????ADO??????
????22??loadrunner9.5??????????c:PROGRA~1MICROS~1office12Grooveutil.DLL????????λ?÷?????Ч
????Office2007??????IE?????????Groove GFSBrowser Helper ???
????23??LR???????????????????
????LR??????????????1080??????????????????????????????????8088?????????????
??????LR??????£????Xitami.config????????portbase??????????????????1000????
?????????????portbase+80??
????????????8088????portionbase???8008??????????????8088=8008+80????
????24????Web_reg_find?????????????????????
?????????????и?default.cfg ???????и??????? UTF8InputOutput ??????????0
????25?????IP Wizard????
????http://hi.baidu.com/higkoo/blog/item/39bbb21bc33d76dcac6e751c.html
????LoadRunner?????“IP Wizard”??????????鷳?????????????????????????????Ч??
?????????д???????????
????1. ????????IP? 192.168.10.31
????2. ????????IP? 192.168.10.10
????3. ???????IP? 110.119.120.122
???????????????????????IP??BAT?????
????netsh interface ip add address ???????? 110.119.120.122 255.255.0.0
???????????????????
????netsh interface ip del address ???????? 110.119.120.122
????????????????????·???Shell?????
????route add -host 110.119.120.122 gw 192.168.10.31
???????·???????
????route del -host 110.119.120.122 gw 192.168.10.31
???????????????????????????κλ???????н????Ч??????н???????
????26????δ??????е???LoadRunner?????
????Here is the command line that you need to execute to run a VuGen script from the command prompt:
????<LoadRunner>inmmdrv.exe -usr <path to usr file>
????Note:
????In order to get all the other options that go with the command?? run mmdrv.exe from the command prompt without any options.
????27??????"int64??????????LR????????"????????C????????LR?У?LR????int64???????????????
?????????C????????DLL???????LR?е???
????28??LoadRunner?????????Windows????????“net use failed”
???????????
??????????????????????????????????????????????????->???????->??????????->?????????????????????????->????????
????????????????????????
?????????????????windows?????????????????Remote Procedure Call(RPC) ??Remote Registry Service
???????????WINDOWS????:????????????????->?????????->???? ???????????C$???????????У?(??????????????)
????????????LR??????????????.????\?????????IPC$ ??????????????????????????????????????C??????????????????????????????????????LR???????
??????
???·???
??????????????????
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