51Testing软件测试论坛
标题:
Error: Failed to initialize. Reason time out.
[打印本页]
作者:
vanadium
时间:
2007-2-9 20:33
标题:
Error: Failed to initialize. Reason time out.
求指点迷津:Error: Failed to initialize. Reason time out.
使用8.0版本的LoadRunner, 录制脚本后,单独运行脚本是通过的,在controller下运行就会报上面的初始化失败的错误,哪位老大知道原因吗。
操作和设置如下:
1. 选择手动方案,添加脚本。
2. 配置负载生成器:name-->localhost; status-->ready; Platform-->window.
3. 浏览器IE6.0,默认浏览器mozila5.0
4. 脚本运行时设置:默认
5. 方案运行时设置:默认
脚本:
vuser_init()
{
web_add_cookie("__utmz=24450342.1169032248.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); DOMAIN=gadmin.stg.movaya.com");
web_add_cookie("__utma=24450342.1625870083.1169032248.1169032248.1169032248.1; DOMAIN=gadmin.stg.movaya.com");
web_add_cookie("PREF=ID=b16d2b2bb110589e:TB=2:NW=1:TM=1157374542:LM=1165318664:GM=1:S=MLuZX8N2DpktHDeh; DOMAIN=sb.google.com");
web_add_cookie("PREF=ID=b16d2b2bb110589e:TB=2:NW=1:TM=1157374542:LM=1165318664:GM=1:S=MLuZX8N2DpktHDeh; DOMAIN=www.google.com");
web_url("gadmin.stg.movaya.com",
"URL=http://gadmin.stg.movaya.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/images/map-bg.jpg", "Referer=http://gadmin.stg.movaya.com/index.do", ENDITEM,
"Url=/images/button_11.gif", "Referer=http://gadmin.stg.movaya.com/styles/movaya.gateway.css", ENDITEM,
"Url=/images/dot.gif", "Referer=http://gadmin.stg.movaya.com/index.do", ENDITEM,
"Url=http://sb.google.com/safebrowsing/update?version=goog-white-domain:1:19,goog-white-url:1:371,goog-black-url:1:8572,goog-black-enchash:1:18085", "Referer=", ENDITEM,
"Url=https://www.google.com/safebrowsing/getkey?", "Referer=", ENDITEM,
"Url=/images/left_bg.jpg", "Referer=http://gadmin.stg.movaya.com/styles/movaya.gateway.css", ENDITEM,
"Url=/images/top_title_bg.gif", "Referer=http://gadmin.stg.movaya.com/styles/movaya.gateway.css", ENDITEM,
"Url=/images/left_top_title.gif", "Referer=http://gadmin.stg.movaya.com/styles/movaya.gateway.css", ENDITEM,
"Url=/images/left_right_title.gif", "Referer=http://gadmin.stg.movaya.com/styles/movaya.gateway.css", ENDITEM,
"Url=/images/button_13.gif", "Referer=http://gadmin.stg.movaya.com/styles/movaya.gateway.css", ENDITEM,
LAST);
lr_think_time(7);
web_submit_form("login.do",
"Snapshot=t2.inf",
ITEMDATA,
"Name=loginBean.accountName", "Value=f", ENDITEM,
"Name=loginBean.userName", "Value=f", ENDITEM,
"Name=loginBean.password", "Value=aaaaaa", ENDITEM,
LAST);
web_url("home.do",
"URL=http://gadmin.stg.movaya.com/report/home.do?helper.module=4&helper.method=page&condition=new",
"Resource=0",
"RecContentType=text/html",
"Referer=http://gadmin.stg.movaya.com/login.do?helper.method=login",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
return 0;
}
Action()
{
lr_think_time(4);
web_url("store.do",
"URL=http://gadmin.stg.movaya.com/store/store.do?helper.module=5",
"Resource=0",
"RecContentType=text/html",
"Referer=http://gadmin.stg.movaya.com/report/home.do?helper.module=4&helper.method=page&condition=new",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
web_link("Manage Categories",
"Text=Manage Categories",
"Snapshot=t5.inf",
EXTRARES,
"Url=/images/button_1.gif", "Referer=http://gadmin.stg.movaya.com/styles/movaya.gateway.css", ENDITEM,
LAST);
lr_rendezvous("categorytype");
lr_start_transaction("categorytype");
web_submit_form("category.do",
"Snapshot=t6.inf",
ITEMDATA,
"Name=categoryId", "Value=5", ENDITEM,
"Name=categoryId", "Value=6", ENDITEM,
"Name=categoryId", "Value=7", ENDITEM,
"Name=categoryId", "Value=8", ENDITEM,
"Name=categoryId", "Value=9", ENDITEM,
"Name=categoryId", "Value=10", ENDITEM,
"Name=categoryId", "Value=11", ENDITEM,
"Name=categoryId", "Value=12", ENDITEM,
"Name=categoryId", "Value=13", ENDITEM,
"Name=categoryId", "Value=14", ENDITEM,
"Name=categoryId", "Value=15", ENDITEM,
"Name=categoryId", "Value=16", ENDITEM,
"Name=categoryId", "Value=17", ENDITEM,
"Name=categoryId", "Value=18", ENDITEM,
"Name=categoryId", "Value=19", ENDITEM,
"Name=categoryId", "Value=20", ENDITEM,
"Name=categoryId", "Value=21", ENDITEM,
"Name=categoryId", "Value=22", ENDITEM,
"Name=categoryId", "Value=23", ENDITEM,
"Name=categoryId", "Value=24", ENDITEM,
"Name=categoryId", "Value=69", ENDITEM,
"Name=categoryId", "Value=70", ENDITEM,
"Name=categoryId", "Value=71", ENDITEM,
"Name=categoryId", "Value=73", ENDITEM,
"Name=categoryId", "Value=75", ENDITEM,
"Name=categoryId", "Value=76", ENDITEM,
"Name=categoryId", "Value=80", ENDITEM,
"Name=categoryId", "Value=81", ENDITEM,
"Name=categoryId", "Value=82", ENDITEM,
"Name=categoryId", "Value=83", ENDITEM,
"Name=categoryId", "Value=84", ENDITEM,
"Name=categoryId", "Value=85", ENDITEM,
"Name=categoryId", "Value=86", ENDITEM,
"Name=categoryId", "Value=87", ENDITEM,
"Name=categoryId", "Value=88", ENDITEM,
"Name=categoryId", "Value=90", ENDITEM,
"Name=categoryId", "Value=96", ENDITEM,
"Name=categoryId", "Value=97", ENDITEM,
"Name=categoryId", "Value=98", ENDITEM,
"Name=categoryId", "Value=99", ENDITEM,
"Name=categoryId", "Value=100", ENDITEM,
"Name=categoryId", "Value=125", ENDITEM,
"Name=categoryId", "Value=126", ENDITEM,
"Name=categoryId", "Value=127", ENDITEM,
"Name=categoryId", "Value=128", ENDITEM,
"Name=categoryId", "Value=129", ENDITEM,
"Name=categoryId", "Value=130", ENDITEM,
"Name=categoryId", "Value=131", ENDITEM,
"Name=categoryId", "Value=132", ENDITEM,
"Name=categoryId", "Value=133", ENDITEM,
"Name=categoryId", "Value=134", ENDITEM,
"Name=selected", "Value=Unselect all", ENDITEM,
LAST);
lr_end_transaction("categorytype", LR_AUTO);
return 0;
}
vuser_end()
{
web_url("logout",
"URL=http://gadmin.stg.movaya.com/templates/logout",
"Resource=0",
"RecContentType=text/html",
"Referer=http://gadmin.stg.movaya.com/store/products/category.do?helper.method=docheck",
"Snapshot=t14.inf",
"Mode=HTML",
LAST);
return 0;
}
[
本帖最后由 vanadium 于 2007-2-10 11:20 编辑
]
作者:
ready0709
时间:
2007-2-10 10:14
你是想问error的原因吧
你在计划中选择 运行虚拟用户之前初始化 试试
作者:
vanadium
时间:
2007-2-10 10:23
改了您所说的设置,问题依旧,在选择run之前就一直停留在initialize状态直到time out
很怀疑是不是计算机有什么配置不对
作者:
断寒
时间:
2007-2-12 09:55
运行的时候你手工在浏览器中登陆看看是什么情况。
PS:题外话,我一般把脚本中web_add_cookie()这个函数去掉,不知道对脚本运行是不是有影响
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2