|
我录制了一个登陆操作,1个用户登陆用时2秒,50个并发就用了56秒,代码如下,我觉得太慢了,所以把web_submit_form后面的代码给注释掉了,50个并发就只要17秒,不知这样是不是能否真实反映登陆?
#include "web_api.h"
Action()
{
web_url("pcoms_xss",
"URL=http://test3:8080/pcoms_xss",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/pcoms_xss/images/skin1/img/business/login_-bt.gif", "Referer=http://test3:8080/pcoms_xss/", ENDITEM,
"Url=/pcoms_xss/images/skin1/img/business/img_xss/login_pic.jpg", "Referer=http://test3:8080/pcoms_xss/", ENDITEM,
"Url=/pcoms_xss/images/skin1/img/business/img_xss/login5_11.jpg", "Referer=http://test3:8080/pcoms_xss/", ENDITEM,
"Url=/pcoms_xss/images/skin1/img/business/img_xss/login_copyright.gif", "Referer=http://test3:8080/pcoms_xss/", ENDITEM,
LAST);
//lr_think_time( 9 );
lr_start_transaction("login");
//lr_think_time( 2 );
web_submit_form("login.do;jsessionid=6454F4F09049361F302872D26D601C58",
"Snapshot=t2.inf",
ITEMDATA,
"Name=departId", "Value=", ENDITEM,
"Name=userId", "Value=", ENDITEM,
"Name=loginType", "Value=工号", ENDITEM,
"Name=userAccount", "Value={username}", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=checkbox", "Value=<OFF>", ENDITEM,
"Name=btnLogin", "Value=登 录", ENDITEM,
LAST);
/*web_url("main.do",
"URL=http://test3:8080/pcoms_xss/main.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=images/skin1/img/business/top_03.gif", "Referer=http://test3:8080/pcoms_xss/main/top.do", ENDITEM,
"Url=images/skin1/img/business/main_05.gif", "Referer=http://test3:8080/pcoms_xss/main/right.do", ENDITEM,
"Url=images/skin1/img/business/img_xss/main2_02.gif", "Referer=http://test3:8080/pcoms_xss/main/top.do", ENDITEM,
"Url=images/skin1/tree/loading_xp.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/img/business/main_bt2.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/img/business/main_bt1.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/grmb.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/img/business/main_bottombg.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/rcgz.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/01/jcxx.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/loading.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/xp/Tplus.png", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/01/qxkz.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/xp/L.png", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/01/gzl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/xp/Lplus.png", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/01/qtgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/blank.png", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/xp/I.png", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/01/xtgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/sbgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/bzgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/rcdj.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/zydj.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/jmdj.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/ycgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/djfx.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/khgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/djbg.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/dxgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/jsjd.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/qxgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/whby.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/pxks.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/gncd.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/02/wdzx1.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/02/wdzx.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/xp/T.png", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/sbgl/sbgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/xgmm.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/bzgl/sbdjbz.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/bzgl/nddjjh.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/zydj/djlxgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/zydj/jhtgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/zydj/xzdjjh.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/zydj/jsdjjg.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/02/wdgl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/dzmk.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/dxx.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/ggtz.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/swzx.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/xp/Tminus.png", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/04/grzl.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/img/business/ws_headbg.gif", "Referer=http://test3:8080/pcoms_xss/main/workspace.do", ENDITEM,
"Url=images/skin1/img/business/ws_dot.gif", "Referer=http://test3:8080/pcoms_xss/main/workspace.do", ENDITEM,
"Url=images/skin1/tree/module/03/zydj/jjrsz.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/tree/module/03/zydj/djsjcx.gif", "Referer=http://test3:8080/pcoms_xss/main/left.do", ENDITEM,
"Url=images/skin1/popup/spinner.gif", "Referer=http://test3:8080/pcoms_xss/main/right.do", ENDITEM,
"Url=images/skin1/popup/dialogclose.gif", "Referer=http://test3:8080/pcoms_xss/main/right.do", ENDITEM,
LAST);
web_url("listMenu.do",
"URL=http://test3:8080/pcoms_xss/authm/listMenu.do?parent=0000&pType=business",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://test3:8080/pcoms_xss/main/left.do",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
web_url("listMenu.do_2",
"URL=http://test3:8080/pcoms_xss/authm/listMenu.do?parent=0003&pType=business",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://test3:8080/pcoms_xss/main/left.do",
"Snapshot=t5.inf",
"Mode=HTML",
LAST);
web_url("listMenu.do_3",
"URL=http://test3:8080/pcoms_xss/authm/listMenu.do?parent=0002&pType=business",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://test3:8080/pcoms_xss/main/left.do",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
web_url("listMenu.do_4",
"URL=http://test3:8080/pcoms_xss/authm/listMenu.do?parent=0004&pType=business",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://test3:8080/pcoms_xss/main/left.do",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
web_custom_request("refresh.do",
"URL=http://test3:8080/pcoms_xss/ieaa/refresh.do",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://test3:8080/pcoms_xss/main/right.do",
"Snapshot=t8.inf",
"Mode=HTML",
"EncType=",
LAST);*/
lr_end_transaction("login", LR_AUTO);
return 0;
} |
|