|
测试WEB时,用loadrunner的visual user generator录制基本用户脚本.如下:请问要什么才能把
sessionID参数化,使脚本在过了session的时间后还能运行.
vuser_init()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 7
// {JSESSIONID2} = "A841370DA4B6568309B0CB75EADF8765"
// */
web_reg_save_param("JSESSIONID2",
"LB/IC=jsessionid=",
"RB/IC=\"",
"Ord=1",
"Search=body",
"RelFrameId=1",
LAST);
web_url("shss",
"URL=http://90.0.3.99:8080/shss",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/shss/images/botton/dl_1.gif", "Referer=http://90.0.3.99:8080/shss/", ENDITEM,
LAST);
lr_think_time(12);
web_submit_form("loginAction.do;jsessionid=A841370DA4B6568309B0CB75EADF8765",
"Snapshot=t2.inf",
ITEMDATA,
"Name=user", "Value=湘K01755", ENDITEM,
"Name=calletter", "Value=", ENDITEM,
"Name=password", "Value=1", ENDITEM,
EXTRARES,
"Url=images/botton/jbzl.gif", ENDITEM,
"Url=images/botton/azxp.gif", ENDITEM,
"Url=images/botton/fwtc.gif", ENDITEM,
"Url=images/botton/wsc_1.gif", ENDITEM,
"Url=images/botton/xptj.gif", ENDITEM,
"Url=images/botton/jfxx.gif", ENDITEM,
"Url=images/botton/wtfk_1.gif", ENDITEM,
"Url=images/botton/cljq_1.gif", ENDITEM,
"Url=images/botton/qfxx_1.gif", ENDITEM,
"Url=images/botton/rdhd_1.gif", ENDITEM,
"Url=images/botton/lx_1.gif", ENDITEM,
"Url=images/botton/tcdl_1.gif", ENDITEM,
"Url=images/top_4.jpg", ENDITEM,
"Url=images/right_4.gif", ENDITEM,
"Url=images/lift_9.jpg", ENDITEM,
"Url=images/right_12.gif", ENDITEM,
LAST);
return 0; |
|