|
8#
楼主 |
发表于 2005-6-29 13:53:15
|
只看该作者
action的完整脚本
#include "as_web.h"
action()
{
web_add_cookie("JSESSIONID=342BF3D617C9D53B95B171B6C2C93072; DOMAIN=192.168.20.101");
web_url("userCreate.do",
"URL=http://192.168.20.101:8000/ezframework/security/userCreate.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.20.101:8000/ezframework/security/userCreate.do",
"Snapshot=t47.inf",
"Mode=HTML",
EXTRARES,
"URL=../fw/blue/style/menu.css", ENDITEM,
"URL=../fw/blue/style/controls.css", ENDITEM,
"URL=../fw/blue/style/forms.css", ENDITEM,
"URL=../fw/blue/style/panel.css", ENDITEM,
"URL=../fw/blue/image/separator.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM1.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgL3.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM3.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgR3.gif", ENDITEM,
LAST);
lr_think_time(5);
lr_start_transaction("create_user");
web_submit_data("userCreate.do2",
"Action=http://192.168.20.101:8000/ezframework/security/userCreate.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.20.101:8000/ezframework/security/userCreate.do",
"Snapshot=t48.inf",
"Mode=HTML",
ITEMDATA,
"Name=formid", "Value=frmCreate", ENDITEM,
"Name=loginName", "Value=vvuser-{MM}-{vUserID}-{iteration}", ENDITEM,
"Name=newPsw", "Value=1", ENDITEM,
"Name=reNewPsw", "Value=1", ENDITEM,
"Name=firstName", "Value=", ENDITEM,
"Name=lastName", "Value=", ENDITEM,
"Name=tel", "Value=", ENDITEM,
"Name=email", "Value=", ENDITEM,
"Name=address", "Value=", ENDITEM,
"Name=age", "Value=", ENDITEM,
"Name=organization", "Value=", ENDITEM,
"Name=btnBack", "Value=", ENDITEM,
"Name=btnSave", "Value=clicked", ENDITEM,
EXTRARES,
"URL=../fw/blue/style/menu.css", ENDITEM,
"URL=../fw/blue/style/controls.css", ENDITEM,
"URL=../fw/blue/style/forms.css", ENDITEM,
"URL=../fw/blue/style/panel.css", ENDITEM,
"URL=../fw/blue/image/separator.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM1.gif", ENDITEM,
LAST);
lr_think_time(1);
lr_end_transaction("create_user", LR_AUTO);
web_link("安全",
"Text=安全",
"Snapshot=t49.inf",
EXTRARES,
"URL=../fw/blue/style/menu.css", ENDITEM,
"URL=../fw/blue/style/controls.css", ENDITEM,
"URL=../fw/blue/style/forms.css", ENDITEM,
"URL=../fw/blue/style/panel.css", ENDITEM,
"URL=../fw/blue/image/separator.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM1.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgL3.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM3.gif", ENDITEM,
LAST);
lr_think_time(10);
web_submit_data("userBrowse.do",
"Action=http://192.168.20.101:8000/ezframework/security/userBrowse.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.20.101:8000/ezframework/security/userBrowse.do",
"Snapshot=t50.inf",
"Mode=HTML",
ITEMDATA,
"Name=formid", "Value=userQuery", ENDITEM,
"Name=loginName", "Value=vvuser-{MM}-{vUserID}-{iteration}", ENDITEM,
"Name=firstName", "Value=", ENDITEM,
"Name=lastName", "Value=", ENDITEM,
"Name=email", "Value=", ENDITEM,
"Name=isActive", "Value=on", ENDITEM,
"Name=btnSearch", "Value=clicked", ENDITEM,
EXTRARES,
"URL=../fw/blue/style/menu.css", ENDITEM,
"URL=../fw/blue/style/forms.css", ENDITEM,
"URL=../fw/blue/style/panel.css", ENDITEM,
"URL=../fw/blue/style/controls.css", ENDITEM,
"URL=../fw/blue/image/separator.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM1.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM1.gif", ENDITEM,
LAST);
lr_start_transaction("delete_user");
web_image("delete.gif",
"Src=fw/blue/image/icons/delete.gif",
"Snapshot=t51.inf",
EXTRARES,
"URL=../fw/blue/style/menu.css", ENDITEM,
"URL=../fw/blue/style/controls.css", ENDITEM,
"URL=../fw/blue/style/panel.css", ENDITEM,
"URL=../fw/blue/style/forms.css", ENDITEM,
"URL=../fw/blue/image/separator.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM1.gif", ENDITEM,
LAST);
web_link("安全2",
"Text=安全",
"Snapshot=t52.inf",
EXTRARES,
"URL=../fw/blue/style/controls.css", ENDITEM,
"URL=../fw/blue/style/forms.css", ENDITEM,
"URL=../fw/blue/style/panel.css", ENDITEM,
"URL=../fw/blue/style/menu.css", ENDITEM,
"URL=../fw/blue/image/separator.gif", ENDITEM,
"URL=../fw/blue/image/buttons/btnTxtBgM1.gif", ENDITEM,
LAST);
lr_end_transaction("delete_user", LR_AUTO);
return 0;
}
说明:主要动作就是2个即创建一个用户和删除一个用户
版主和广大LR高手,这个问题的解决就指望你们了,这里先谢了 |
|