|
VU脚本如下:
vuser_init()
{
lr_start_transaction("flesh");
web_url("login.do",
"URL=http://10.12.1.241:9090/zenointel_admin/admin/login.do?act=key",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=images/bg.jpg", "Referer=http://10.12.1.241:9090/zenointel_admin/admin/login.do?act=key", ENDITEM,
"Url=images/buttom.png", "Referer=http://10.12.1.241:9090/zenointel_admin/admin/login.do?act=key", ENDITEM,
"Url=images/login.png", "Referer=", ENDITEM,
LAST);
lr_end_transaction("flesh", LR_AUTO);
lr_think_time(17);
lr_start_transaction("login");
web_submit_data("login.do;jsessionid=8B18A985893C8541AD7484379EEBC036",
"Action=http://10.12.1.241:9090/zenointel_admin/admin/login.do;jsessionid=8B18A985893C8541AD7484379EEBC036",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.12.1.241:9090/zenointel_admin/admin/login.do?act=key",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=loginname", "Value=system", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=randcode", "Value=", ENDITEM,
EXTRARES,
"Url=frame/images/mainbg.jpg", "Referer=http://10.12.1.241:9090/zenointel_admin/admin/frame/main.jsp", ENDITEM,
LAST);
lr_end_transaction("login",LR_AUTO);
return 0;
}
Action()
{
lr_start_transaction("neruser");
web_url("over.png",
"URL=http://10.12.1.241:9090/zenointel_admin/admin/frame/menu/over.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://10.12.1.241:9090/zenointel_admin/admin/frame/main.jsp",
"Snapshot=t6.inf",
LAST);
web_url("banner.png",
"URL=http://10.12.1.241:9090/zenointel_admin/admin/frame/images/banner.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://10.12.1.241:9090/zenointel_admin/admin/frame/main.jsp",
"Snapshot=t7.inf",
LAST);
web_submit_data("nav.do",
"Action=http://10.12.1.241:9090/zenointel_admin/admin/nav.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.12.1.241:9090/zenointel_admin/admin/frame/main.jsp",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=coding", "Value=001009", ENDITEM,
"Name=s", "Value=0.3459531420499537", ENDITEM,
EXTRARES,
"Url=frame/images/middletable.gif", "Referer=http://10.12.1.241:9090/zenointel_admin/admin/frame/main.jsp", ENDITEM,
LAST);
web_url("users.do",
"URL=http://10.12.1.241:9090/zenointel_admin/admin/users.do?act=operation",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.12.1.241:9090/zenointel_admin/admin/frame/main.jsp",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);
web_url("DDEE4930190DB3E98C461B634A11584C.cache.html",
"URL=http://10.12.1.241:9090/zenointel_admin/admin/ui/OpGroupForm/DDEE4930190DB3E98C461B634A11584C.cache.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.12.1.241:9090/zenointel_admin/admin/users.do?act=create&type=control",
"Snapshot=t11.inf",
"Mode=HTML",
EXTRARES,
"Url=/zenointel_admin/admin/xml.file?act=get&type=org&name=system&coding=001&mxy=1337740066406", ENDITEM,
"Url=/zenointel_admin/admin/xml.file?act=get&type=right&name=system&coding=001&mxy=1337740066406", ENDITEM,
"Url=/zenointel_admin/admin/image/loader.gif", "Referer=http://10.12.1.241:9090/zenointel_admin/admin/users.do?act=create&type=control", ENDITEM,
LAST);
web_submit_data("users.do_2",
"Action=http://10.12.1.241:9090/zenointel_admin/admin/users.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.12.1.241:9090/zenointel_admin/admin/users.do?act=create&type=control",
"Snapshot=t12.inf",
"Mode=HTML",
ITEMDATA,
"Name=coding", "Value=001", ENDITEM,
"Name=groupid", "Value=1", ENDITEM,
"Name=reallink", "Value=1", ENDITEM,
"Name=loginname", "Value=589", ENDITEM,
"Name=username", "Value=589", ENDITEM,
"Name=loginpass", "Value=589", ENDITEM,
"Name=usertype", "Value=1", ENDITEM,
"Name=papername", "Value=韬唤璇\x81", ENDITEM,
"Name=papernumber", "Value=684651654", ENDITEM,
"Name=interfacename", "Value=", ENDITEM,
"Name=interfacephone", "Value=", ENDITEM,
"Name=connectionname", "Value=", ENDITEM,
"Name=connectionphone", "Value=", ENDITEM,
"Name=address", "Value=", ENDITEM,
"Name=id", "Value=", ENDITEM,
"Name=act", "Value=add", ENDITEM,
"Name=forward", "Value=operation", ENDITEM,
"Name=forwardtype", "Value=operation", ENDITEM,
"Name=rggcoding", "Value=", ENDITEM,
"Name=x", "Value=27", ENDITEM,
"Name=y", "Value=9", ENDITEM,
LAST);
lr_end_transaction("neruser",LR_AUTO);
return 0;
}
vuser_end()
{
return 0;
}
这样写的话 在回放时 是成功的
但是在加压时 会报 Action.c(46): Error: C interpreter run time error: Action.c (46): Error -- memory violation : Exception ACCESS_VIOLATION received.的error
100个VU会有30左右报这个错误,求助如何解决 |
|