如何添加事务和集合点?
最近初学loadrunner,请教如何添加事条?是代码的什么位置添加?录制脚本时主要是进行哪几个操作过程?
开始是按照教程来做,录制脚完后进行运行,却提示:
Failed to execute the command:
mmdrv.exe -f "C:\Documents and Settings\new\Local Settings\Temp\noname24\mdrv_cmd.txt"
Error code -1.
Please, check your LoadRunner installation.
结果界面也没有体现!
请高手指教!多谢 从错误提示看,可能是安装的时候出问题了 事务和集合点
可以在录制的时候加,在vugen.exe录制的那个窗口上有相关按钮,按钮是Toolbar类型的Resoure
还可以在script自己写脚步添加。
[ 本帖最后由 shanxi 于 2007-5-12 09:18 编辑 ] 录制的时候有按钮啊
脚本中也可以自己添加 login()
{
int b;
web_add_cookie(".ASPXANONYMOUS=RNvDxJbPxwEkAAAAZmNiNTAwMDYtOGJlYS00YmE1LWEyNWMtOWMzZGUyMDFhMDNkCv5zPNYbDmOlwUovH-Q1cxItUk81; DOMAIN=localhost");
web_add_cookie("eWebShop1_Cart=5B0BB1B0; DOMAIN=localhost");
web_url("Default.aspx",
"URL=http://localhost/eWebShop/Default.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"URL=template/0003/files/mybg.gif", ENDITEM,
"URL=template/0003/files/23.gif", ENDITEM,
"URL=UploadFile/AD/0003_03.gif", ENDITEM,
"URL=template/0003/files/7.gif", ENDITEM,
"URL=template/0003/files/21.gif", ENDITEM,
"URL=template/0003/files/6.gif", ENDITEM,
"URL=UploadFile/Ad/0003_01.gif", ENDITEM,
"URL=UploadFile/Ad/0003_02.gif", ENDITEM,
"URL=template/0003/files/12.gif", ENDITEM,
"URL=template/0003/files/home13.gif", ENDITEM,
"URL=template/0003/files/14.gif", ENDITEM,
LAST);
b = web_reg_find("Text=查看我在网站上的所有订单,包括新订单和以前的老订单都可以查询到。",
"Search=All",
LAST);
lr_start_transaction("登录");//事务开始
web_submit_form("Default.aspx_2",
"Snapshot=t6.inf",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=userpwd", "Value={passwd}", ENDITEM,
"Name=imageField.x", "Value=57", ENDITEM,
"Name=imageField.y", "Value=9", ENDITEM,
EXTRARES,
"URL=template/0003/files/mybg.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/23.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=UploadFile/AD/0003_03.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/6.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/7.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/21.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
LAST);
if(b ==0)
lr_end_transaction("登录", LR_PASS); //事务结束
else
lr_end_transaction("登录", LR_FAIL); //事务结束
return 0;
} 添加事务步骤 Vu界面
1。菜单Inset—Start Transaction
用户动作.....
2. 菜单Inset—End Transaction DDDDsdlkfj2 :Q
页:
[1]