|
目的:测试登录功能,了解不同场景设置下测试结果不同。
脚本:- Action()
- {
- lr_start_transaction("login");
- web_url("192.168.6.230:8188",
- "URL=http://192.168.6.230:8188/",
- "Resource=0",
- "RecContentType=text/html",
- "Referer=",
- "Snapshot=t1.inf",
- "Mode=HTML",
- EXTRARES,
- "Url=/Resource/Image/Common/Bg_5.gif", ENDITEM,
- "Url=/Resource/Image/Common/Bg_4.jpg", ENDITEM,
- "Url=/Resource/Image/Button/Btn_1.gif", ENDITEM,
- "Url=/Resource/Image/Common/Bg_3.gif", ENDITEM,
- "Url=/Resource/Image/Common/Line_1.gif", ENDITEM,
- LAST);
- web_submit_form("cdmu_index.aspx",
- "Snapshot=t2.inf",
- ITEMDATA,
- "Name=ctl00$ContentPlaceHolder1$txt_name", "Value=qqchen3", ENDITEM,
- "Name=ctl00$ContentPlaceHolder1$txt_pwd", "Value=111111", ENDITEM,
- "Name=ctl00$ContentPlaceHolder1$txt_verifyCode", "Value=0227", ENDITEM,
- EXTRARES,
- "Url=/Resource/Image/Common/Bg.jpg", "Referer=http://192.168.6.230:8188/cdmu_default.aspx", ENDITEM,
- "Url=/Resource/Image/NavigatorBar/Icon_1.gif", "Referer=http://192.168.6.230:8188/cdmu_default.aspx", ENDITEM,
- LAST);
- lr_end_transaction("login", LR_AUTO);
- return 0;
- }
复制代码 场景1:一个虚拟用户持续1分钟,测试结果如图1
场景2:一个虚拟用户持续2分钟,测试结果如图2
问题:为什么login事务的平均事务响应时间差距那么大?并且1分钟里脚本运行了652次,而2分钟里却跑了3506次,差距这么大呢。 |
|