|
我最近在用loadrunner录制GWT的时候分别选择的协议web(http/html)、ajax(click和sript)、web(click和sript)这是三个,录制的格式是url 的,但是录制完成后,没法参数化。所有要提交的数据都在web_custom_request函数的body了。以下录制的web_custom_request函数的代码:
web_add_auto_header("Accept",
"*/*");
web_add_auto_header("Cache-Control",
"no-cache");
lr_think_time(27);
web_custom_request("IDACall",
"URL=http://192.168.0.204:8080/planmis/sc/IDACall?isc_rpc=1&isc_v=SC_SNAPSHOT-2011-10-04&isc_xhr=1&isc_tnum=1",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://192.168.0.204:8080/#main",
"Snapshot=t124.inf",
"Mode=HTTP",
"EncType=application/x-www-form-urlencoded; charset=UTF-8",
"Body=_transaction="
"%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E1%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Ccriteria%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2Fcriteria%3E%3CoperationConfig%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CdataSource%3EsupplyItemSpringDMI%3C%2FdataSource%3E%3CoperationType%3Efetch%3C%2F"
"operationType%3E%3CtextMatchStyle%3Esubstring%3C%2FtextMatchStyle%3E%3C%2FoperationConfig%3E%3CstartRow%20xsi%3Atype%3D%22xsd%3Along%22%3E0%3C%2FstartRow%3E%3CendRow%20xsi%3Atype%3D%22xsd%3Along%22%3E10%3C%2FendRow%3E%3CcomponentId%3Eisc_ListGrid_0%3C%2FcomponentId%3E%3CappID%3EbuiltinApplication%3C%2FappID%3E%3Coperation%3EsupplyItemSpringDMI_fetch%3C%2Foperation%3E%3ColdValues%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2FoldValues%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E&"
"protocolVersion=1.0",
LAST);
web_custom_request("IDACall_2",
"URL=http://192.168.0.204:8080/planmis/sc/IDACall?isc_rpc=1&isc_v=SC_SNAPSHOT-2011-10-04&isc_xhr=1&isc_tnum=2",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://192.168.0.204:8080/#jhgz%E9%87%8D%E7%82%B9%E5%B7%A5%E4%BD%9C",
"Snapshot=t125.inf",
"Mode=HTTP",
"EncType=application/x-www-form-urlencoded; charset=UTF-8",
"Body=_transaction="
"%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E2%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Ccriteria%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2Fcriteria%3E%3CoperationConfig%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CdataSource%3EsupplyItemSpringDMI%3C%2FdataSource%3E%3CoperationType%3Efetch%3C%2F"
"operationType%3E%3CtextMatchStyle%3Esubstring%3C%2FtextMatchStyle%3E%3C%2FoperationConfig%3E%3CstartRow%20xsi%3Atype%3D%22xsd%3Along%22%3E0%3C%2FstartRow%3E%3CendRow%20xsi%3Atype%3D%22xsd%3Along%22%3E20%3C%2FendRow%3E%3CcomponentId%3Eisc_ListGrid_0%3C%2FcomponentId%3E%3CappID%3EbuiltinApplication%3C%2FappID%3E%3Coperation%3EsupplyItemSpringDMI_fetch%3C%2Foperation%3E%3ColdValues%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2FoldValues%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E&"
"protocolVersion=1.0",
LAST);
web_custom_request("IDACall_3",
"URL=http://192.168.0.204:8080/planmis/sc/IDACall?isc_rpc=1&isc_v=SC_SNAPSHOT-2011-10-04&isc_xhr=1&isc_tnum=3",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://192.168.0.204:8080/#jhgz%E9%87%8D%E7%82%B9%E5%B7%A5%E4%BD%9C",
"Snapshot=t126.inf",
"Mode=HTTP",
"EncType=application/x-www-form-urlencoded; charset=UTF-8",
"Body=_transaction="
"%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E3%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Ccriteria%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2Fcriteria%3E%3CoperationConfig%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CdataSource%3EsupplyItemSpringDMI%3C%2FdataSource%3E%3CoperationType%3Efetch%3C%2F"
"operationType%3E%3CtextMatchStyle%3Esubstring%3C%2FtextMatchStyle%3E%3C%2FoperationConfig%3E%3CstartRow%20xsi%3Atype%3D%22xsd%3Along%22%3E10%3C%2FstartRow%3E%3CendRow%20xsi%3Atype%3D%22xsd%3Along%22%3E20%3C%2FendRow%3E%3CcomponentId%3Eisc_ListGrid_0%3C%2FcomponentId%3E%3CappID%3EbuiltinApplication%3C%2FappID%3E%3Coperation%3EsupplyItemSpringDMI_fetch%3C%2Foperation%3E%3ColdValues%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2FoldValues%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E&"
"protocolVersion=1.0",
LAST);
web_custom_request("IDACall_4",
"URL=http://192.168.0.204:8080/planmis/sc/IDACall?isc_rpc=1&isc_v=SC_SNAPSHOT-2011-10-04&isc_xhr=1&isc_tnum=4",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://192.168.0.204:8080/#jhgz%E9%87%8D%E7%82%B9%E5%B7%A5%E4%BD%9C",
"Snapshot=t127.inf",
"Mode=HTTP",
"EncType=application/x-www-form-urlencoded; charset=UTF-8",
"Body=_transaction="
"%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E4%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Ccriteria%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2Fcriteria%3E%3CoperationConfig%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CdataSource%3EsupplyItemSpringDMI%3C%2FdataSource%3E%3CoperationType%3Efetch%3C%2F"
"operationType%3E%3CtextMatchStyle%3Esubstring%3C%2FtextMatchStyle%3E%3C%2FoperationConfig%3E%3CstartRow%20xsi%3Atype%3D%22xsd%3Along%22%3E20%3C%2FstartRow%3E%3CendRow%20xsi%3Atype%3D%22xsd%3Along%22%3E30%3C%2FendRow%3E%3CcomponentId%3Eisc_ListGrid_0%3C%2FcomponentId%3E%3CappID%3EbuiltinApplication%3C%2FappID%3E%3Coperation%3EsupplyItemSpringDMI_fetch%3C%2Foperation%3E%3ColdValues%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3C%2FoldValues%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E&"
"protocolVersion=1.0",
LAST);
web_concurrent_start(NULL);
web_url("hthumb_grip.png",
"URL=http://192.168.0.204:8080/planmis/sc/skins/Enterprise/images/Scrollbar/hthumb_grip.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://192.168.0.204:8080/",
"Snapshot=t128.inf",
LAST);
web_url("hthumb_stretch.png",
"URL=http://192.168.0.204:8080/planmis/sc/skins/Enterprise/images/Scrollbar/hthumb_stretch.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://192.168.0.204:8080/",
"Snapshot=t129.inf",
LAST);
web_url("hscroll_track.png",
"URL=http://192.168.0.204:8080/planmis/sc/skins/Enterprise/images/Scrollbar/hscroll_track.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://192.168.0.204:8080/",
"Snapshot=t130.inf",
LAST);
web_url("page-prev.gif",
"URL=http://192.168.0.204:8080/images/page-prev.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://192.168.0.204:8080/",
"Snapshot=t131.inf",
LAST);
web_concurrent_end(NULL);
web_revert_auto_header("Accept");
web_revert_auto_header("Accept-Encoding");
web_revert_auto_header("Accept-Language");
lr_think_time(33);
web_custom_request("uup.php",
"URL=http://uup.f.360.cn/uup.php",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t132.inf",
"Mode=HTTP",
"EncType=application/octet-stream",
"BodyBinary=\\x0C\\x05\\x00\\x00\\x01-\\x00\\x00\\x00\\x00\\x00\\x05\\x02\\x00\\x04\\x00\\x08龤l'X (/娥J豔貒h琞栺饊~;\n蚒茢\\x9C<塵\\x12L&bぇ3\\x16ze3.E\\xE44蜱Q4閂L\\x05Wde糩a\\x8F\\x0CH 莰揲斡遗dH醨!鰘\\x1A4睮茏J&_K\\x1657湌a怤曂$\\x89\t\\x07#\\xA9<\\x08擊泉\\x80冽Ю\\x16縻\\x08ZdDP\\x8B\\x0E`\\xB5\\x08\\x14鈤H鶐8mO矕\\xDF \\x1E\\\\_滾y\\x0BAe踡\\xFC-糡\\xD4?O\\x17穄}V\\x13D\\x92>n魄\\xFF\\xD4\\xFF贫X\\xBA\\x0EM\rs\tXv\\x1D\\xAD\\xFF(d#\\x17砈7\\x1C\"劰襍\\x90*\\xD1\\x00u;@韬藜/"
"5F椴\\xED7\\x08\\x04{ 餹L\\x180麃\\x17^韄\\x90\\x05鷭0缐nn鸙揌\\\\F燛\\x1C\\xD6;x\\xFE:枢Um=3V\\x1A\\xE1'\\x12Q,\\x0F濁穼>\\xA45莆",
LAST);
web_add_header("Accept",
"*/*");
web_add_header("Accept-Language",
"zh-cn");
web_add_header("Accept-Encoding",
"gzip, deflate");
web_concurrent_start(NULL);
web_url("header_menu.png",
"URL=http://192.168.0.204:8080/planmis/sc/skins/Enterprise/images/ListGrid/header_menu.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://192.168.0.204:8080/",
"Snapshot=t133.inf",
LAST);
web_add_header("Accept",
"*/*");
web_add_header("Accept-Language",
"zh-cn");
web_add_header("Accept-Encoding",
"gzip, deflate");
web_url("button_Down_start.png_2",
"URL=http://192.168.0.204:8080/planmis/sc/skins/Enterprise/images/button/button_Down_start.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://192.168.0.204:8080/",
"Snapshot=t134.inf",
LAST);
web_concurrent_end(NULL); |
|