|
现状如下:
我录制的一段脚本:
在初vuser_init中录制的登录的脚本,
在action中录制了一些简单的查询脚本
然后在vuser_end中录制的登出的脚本
我在场景中执行这段脚本的时候却除了vuser_init和vuser_end事务执行成功外,其它都不能执行成功,是不是我登录后的seesion值在action中是取不到的?应该怎么样才能把登录的信息传到action中?
望前辈给些指点,多谢!
部分脚本如下:
vuser_init()
{
web_url("main.jsp",
"URL=http://xxx/jsp/main.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=../templates/templateIMG/bgline.gif", ENDITEM,
"Url=../templates/menupic/menu2_04.gif", ENDITEM,
LAST);
lr_think_time( 7 );
web_submit_form("login.do",
"Snapshot=t2.inf",
ITEMDATA,
"Name=chMemberName", "Value={uid}", ENDITEM,
"Name=chPassword", "Value={uid}", ENDITEM,
"Name=chRzm", "Value=8686", ENDITEM,
"Name=submit.x", "Value=28", ENDITEM,
"Name=submit.y", "Value=10", ENDITEM,
EXTRARES,
"Url=templates/templateIMG/bgline.gif", "Referer=http://xxx/login.do?method=login", ENDITEM,
"Url=templates/templateIMG/per2_18.gif", "Referer=http://xxx/login.do?method=login", ENDITEM,
"Url=images/line0.gif", "Referer=http://xxx/login.do?method=login", ENDITEM,
"Url=templates/menupic/menu2_01.gif", "Referer=http://xxx/login.do?method=login", ENDITEM,
LAST);
return 0;
}
Action1()
{
web_add_cookie("JSESSIONID=0000Cv9SAngmpqmIzX1_MwKFq0g:-1; DOMAIN=localhost");
web_url("listPosition.do",
"URL=http://xxx/listPosition.do?method=list",
"Resource=0",
"RecContentType=text/html",
"Referer=http://xxx/login.do?method=login",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=templates/templateIMG/per2_18.gif", "Referer=http://xxx/listPosition.do?method=list", ENDITEM,
"Url=images/line0.gif", "Referer=http://xxx/listPosition.do?method=list", ENDITEM,
"Url=templates/templateIMG/per2_16.gif", "Referer=http://xxx/listPosition.do?method=list", ENDITEM,
"Url=templates/menupic/menu2_06.gif", "Referer=http://xxx/listPosition.do?method=list", ENDITEM,
"Url=templates/menupic/menu2_07.gif", "Referer=http://xxx/listPosition.do?method=list", ENDITEM,
LAST); |
|