?????????????п?????????Щ??HTML????????XML??JS????????????????????????Щ???????JS?????????ü??????????????????HTML????????????3??????
????1???????????HTML?????????????????μ????????г????????????????????web_url??web_link??web_submit_data????Щ???????????EXTRARES????????′???
web_url("WebTours"??
"URL=http://127.0.0.1:1080/WebTours/"??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t1.inf"??
"Mode=HTML"??
EXTRARES??
"Url=http://act.cmcmcdn.com/upload/201507/8afc2fe48db9060fe1bdda2089e1d950.png"?? ENDITEM??
"Url=http://act.cmcmcdn.com/upload/201507/3b491068507d8f85ea7b35d756da7215.png"?? ENDITEM??
LAST);
????2??????????м????Щ????????裬??????HTML???????????μ????????′???
web_url("WebTours"??
"URL=http://127.0.0.1:1080/WebTours/"??
"TargetFrame="??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t1.inf"??
"Mode=HTML"??
LAST);
web_concurrent_start(NULL);
web_url("8afc2fe48db9060fe1bdda2089e1d950.png"??
"URL=http://act.cmcmcdn.com/upload/201507/8afc2fe48db9060fe1bdda2089e1d950.png"??
"TargetFrame="??
"Resource=1"??
"RecContentType=image/png"??
"Referer=http://127.0.0.1:1080/WebTours/"??
"Snapshot=t5.inf"??
LAST);
web_url("3b491068507d8f85ea7b35d756da7215.png"??
"URL=http://act.cmcmcdn.com/upload/201507/3b491068507d8f85ea7b35d756da7215.png"??
"TargetFrame="??
"Resource=1"??
"RecContentType=image/png"??
"Referer=http://127.0.0.1:1080/WebTours/"??
"Snapshot=t6.inf"??
LAST);
web_concurrent_end(NULL);
????3??????????????HTML????????????′???
web_url("WebTours"??
"URL=http://127.0.0.1:1080/WebTours/"??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t1.inf"??
"Mode=HTML"??
LAST);
????URL-based script???
???????????????????????????????????LR???????????£??????????????????????????????????????????е??????????????????????session??cookie????LR????web_concurrent_start()??web_concurrent_end()???????URL-based scriptr?????????????′???
web_url("WebTours"??
"URL=http://127.0.0.1:1080/WebTours/"??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t1.inf"??
"Mode=HTTP"??
LAST);
web_url("header.html"??
"URL=http://127.0.0.1:1080/WebTours/header.html"??
"Resource=0"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/"??
"Snapshot=t2.inf"??
"Mode=HTTP"??
LAST);
web_url("www.baidu.com"??
"URL=http://www.baidu.com/"??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t3.inf"??
"Mode=HTTP"??
LAST);
web_url("webtours.png"??
"URL=http://127.0.0.1:1080/WebTours/images/webtours.png"??
"Resource=1"??
"RecContentType=image/png"??
"Referer=http://127.0.0.1:1080/WebTours/header.html"??
"Snapshot=t4.inf"??
LAST);
web_url("hp_logo.png"??
"URL=http://127.0.0.1:1080/WebTours/images/hp_logo.png"??
"Resource=1"??
"RecContentType=image/png"??
"Referer=http://127.0.0.1:1080/WebTours/header.html"??
"Snapshot=t5.inf"??
LAST);
web_url("welcome.pl"??
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"??
"Resource=0"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/"??
"Snapshot=t6.inf"??
"Mode=HTTP"??
LAST);
web_concurrent_start(NULL);
web_url("home.html"??
"URL=http://127.0.0.1:1080/WebTours/home.html"??
"Resource=0"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"??
"Snapshot=t7.inf"??
"Mode=HTTP"??
LAST);
web_url("nav.pl"??
"URL=http://127.0.0.1:1080/WebTours/nav.pl?in=home"??
"Resource=0"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"??
"Snapshot=t8.inf"??
"Mode=HTTP"??
LAST);
web_concurrent_end(NULL);
web_url("mer_login.gif"??
"URL=http://127.0.0.1:1080/WebTours/images/mer_login.gif"??
"Resource=1"??
"RecContentType=image/gif"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home"??
"Snapshot=t9.inf"??
LAST);
web_concurrent_start(NULL);
web_url("8afc2fe48db9060fe1bdda2089e1d950.png"??
"URL=http://act.cmcmcdn.com/upload/201507/8afc2fe48db9060fe1bdda2089e1d950.png"??
"Resource=1"??
"RecContentType=image/png"??
"Referer=http://127.0.0.1:1080/WebTours/"??
"Snapshot=t10.inf"??
LAST);
web_url("3b491068507d8f85ea7b35d756da7215.png"??
"URL=http://act.cmcmcdn.com/upload/201507/3b491068507d8f85ea7b35d756da7215.png"??
"Resource=1"??
"RecContentType=image/png"??
"Referer=http://127.0.0.1:1080/WebTours/"??
"Snapshot=t11.inf"??
LAST);
web_concurrent_end(NULL);
lr_think_time(12);
web_submit_data("login.pl"??
"Action=http://127.0.0.1:1080/WebTours/login.pl"??
"Method=POST"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home"??
"Snapshot=t12.inf"??
"Mode=HTTP"??
ITEMDATA??
"Name=userSession"?? "Value=120572.172620494zcAVQDVpVcQVzzzHDHcVVpfizHHf"?? ENDITEM??
"Name=username"?? "Value=test1"?? ENDITEM??
"Name=password"?? "Value=test1"?? ENDITEM??
"Name=JSFormSubmit"?? "Value=off"?? ENDITEM??
"Name=login.x"?? "Value=0"?? ENDITEM??
"Name=login.y"?? "Value=0"?? ENDITEM??
LAST);
web_concurrent_start(NULL);
web_url("nav.pl_2"??
"URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home"??
"Resource=0"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/login.pl"??
"Snapshot=t13.inf"??
"Mode=HTTP"??
LAST);
web_url("login.pl_2"??
"URL=http://127.0.0.1:1080/WebTours/login.pl?intro=true"??
"Resource=0"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/login.pl"??
"Snapshot=t14.inf"??
"Mode=HTTP"??
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("flights.gif"??
"URL=http://127.0.0.1:1080/WebTours/images/flights.gif"??
"Resource=1"??
"RecContentType=image/gif"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home"??
"Snapshot=t15.inf"??
LAST);
web_url("signoff.gif"??
"URL=http://127.0.0.1:1080/WebTours/images/signoff.gif"??
"Resource=1"??
"RecContentType=image/gif"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home"??
"Snapshot=t16.inf"??
LAST);
web_url("itinerary.gif"??
"URL=http://127.0.0.1:1080/WebTours/images/itinerary.gif"??
"Resource=1"??
"RecContentType=image/gif"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home"??
"Snapshot=t17.inf"??
LAST);
web_url("in_home.gif"??
"URL=http://127.0.0.1:1080/WebTours/images/in_home.gif"??
"Resource=1"??
"RecContentType=image/gif"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home"??
"Snapshot=t18.inf"??
LAST);
web_concurrent_end(NULL);
return 0;
????????URL?????????????????
????1??create concurrent groups for resources their source HTML page????????????HTML?????????????????????У??????????web_concurrent_start??web_concurrent_end satements ????????????????????????????????????????????????????????????????и????HTML????????????????????????web_url???裬?????????????С?
????2??use web_custom_request only?????????????????????ó???????????VuGen?????HTTP??????LR?????web_custom_request?????????????????£?
web_custom_request("WebTours"??
"URL=http://127.0.0.1:1080/WebTours/"??
"Method=GET"??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t1.inf"??
"Mode=HTTP"??
LAST);
?????????????????????ο?????????
????a.?????????????ó????????HTML???????????URL
????b.????????????????ó????????JS??????y???????????????????????DataGrid??????????????URL
????c.?????????????ó??????????HTTPS???Э?飬???????URL??
??????????HTML?????????????????????????URL??????????????????????????????о?????????????
????2??advanced???
?????????y????????????????9?????


????
?9

????1??save snapshot resources locally????????н???б??????????
????2??add comments to script for HTTP errors while recording???????????????????????????Heades??????????????heades???????????????????????????????????accept-language?????websphere??????????????HTTP?????е?header?????????
????3??correlation???
?????????????е???????????????????10???????LR???????????????????????????LR?????????Щ???????????????????????????????????????LR???????????????????????????????????????????Щ?????????????????????????????????new application??????????????????????new rule?????ù?????????????


??
???10

????run-time settings ????
??????????????????????й????н?????е????????????????????run logic?????pacing?????think time?????miscellaneous??????????????????????????????????????????????????????
???????????
??????????????????????Щ?????????????????????????????Щ????????????????????????????????????????
????????????????????????????????????????????????????transaction???????????????????????????????????е????????????????????????????????????????Σ???????????????????·????????????????????????????????????50?????????????????????????????????????????????????????????????????????
????????????????????????????????????????? ??
????1??????????
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????в???????????????????????????????????????????????????в???
????????????????????????????????????????е?‘??????????’???????????????????????????????????????????????????????????????????????????????в?????????????????????????????????в????????????????????????????????????????????£?????????????????????????????????????????е??‘????????????’???ɡ?
???????????????????????????????????????????????????insert->start transaction??????????????????????????????????????????????????????????????????????‘????????’??????У??????????????в???????????????????ж???????transaction status?????11???????
????1????????????????????????????г???????????PASS???????????????????????FAIL????????????ж?????????STOP??
????2????????г???????????????PASS??
????3??????????????????????FAIL??
????4?????????ж?????????????STOP??
??????????????????????????????в???????????????????????????????????????????????????????????????????????????????????


????
?11

?????????????????????PASS????????????????????????????罫??????????????????????????????????????????LR??????ж????????????????????????????????????????????????????У???????????????????PASS????????????????????FAIL??????????????????????????????????????????鵽????????????????????PASS???????????????????????????????????????????塣?????????????????????ü???????????????ж????????????????????????
web_url("WebTours"??
"URL=http://127.0.0.1:1080/WebTours/"??
"Resource=0"??
"RecContentType=text/html"??
"Referer="??
"Snapshot=t1.inf"??
"Mode=HTML"??
EXTRARES??
"Url=http://act.cmcmcdn.com/upload/201507/8afc2fe48db9060fe1bdda2089e1d950.png"?? ENDITEM??
"Url=http://act.cmcmcdn.com/upload/201507/3b491068507d8f85ea7b35d756da7215.png"?? ENDITEM??
LAST);
lr_start_transaction("???");
lr_think_time(16);
web_submit_data("login.pl"??
"Action=http://127.0.0.1:1080/WebTours/login.pl"??
"Method=POST"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home"??
"Snapshot=t3.inf"??
"Mode=HTML"??
ITEMDATA??
"Name=userSession"?? "Value=120579.391332523zcAcDAcpttVzzzzHDHcVDpiVtzf"?? ENDITEM??
"Name=username"?? "Value=test1"?? ENDITEM??
"Name=password"?? "Value=test1"?? ENDITEM??
"Name=JSFormSubmit"?? "Value=off"?? ENDITEM??
"Name=login.x"?? "Value=45"?? ENDITEM??
"Name=login.y"?? "Value=12"?? ENDITEM??
LAST);
lr_end_transaction("???"??LR_AUTO);
return 0;
??????????????????????????????PASS????????????????????????????????????
web_submit_data("login.pl"??
"Action=http://127.0.0.1:1080/WebTours/login.pl"??
"Method=POST"??
"RecContentType=text/html"??
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home"??
"Snapshot=t3.inf"??
"Mode=HTML"??
ITEMDATA??
"Name=userSession"?? "Value=120579.391332523zcAcDAcpttVzzzzHDHcVDpiVtzf"?? ENDITEM??
"Name=username"?? "Value=error1"?? ENDITEM??
"Name=password"?? "Value=test1"?? ENDITEM??
"Name=JSFormSubmit"?? "Value=off"?? ENDITEM??
"Name=login.x"?? "Value=45"?? ENDITEM??
"Name=login.y"?? "Value=12"?? ENDITEM??
LAST);
????????????????????????????????????????????????PASS???????????????
Action.c(4): web_url("WebTours") was successful?? 9467 body bytes?? 2222 header bytes      [MsgId: MMSG-26386]
Action.c(16): Notify: Transaction "???" started.
Action.c(20): web_submit_data("login.pl") was successful?? 795 body bytes?? 225 header bytes      [MsgId: MMSG-26386]
Action.c(36): Notify: Transaction "???" ended with "Pass" status (Duration: 0.3466 Wasted Time: 0.0031).
Ending action Action.
????2?????????
?????????????????в??????????lr_rendezvous????????????е??????????????????в?????????????е?????????????????????????????????????????????????С?????????????????????????????????????????????????????????
?????????????????????в????????????????????????????action????????У????????vuser_int??vuser_end?????????С?
???????????????????????λ??????????????????е?‘???????’????????????????????????????????insert->rendezvous?????????‘???????’??????????????????????????????????????????????????????д????????
????3?????????
??????????????????????в??????????????????????
??????????????????????????????????????????????е?‘???????’?????????????????????????????????insert->comment?????????‘???????’?????????????????????