51Testing软件测试论坛
标题:
关于LR用户登录的脚本录制
[打印本页]
作者:
Simatu
时间:
2007-9-18 11:11
标题:
关于LR用户登录的脚本录制
LR中录制用户登录脚本:
我就录制了一个用户登录操作,试图将用户信息参数化,但是在脚本里找不到登录的对应信息sdlkfj7
哪出了问题啊。。。。。
作者:
Zee
时间:
2007-9-18 11:14
说明环境:
1,系统架构。
2,协议。
3,应用程序语言。
4,把脚本,和日志都发出来。
作者:
Simatu
时间:
2007-9-18 11:24
典型的三层 架构 , Web(HTTP/HTML), asp,数据库是sql2000
作者:
Simatu
时间:
2007-9-18 11:26
脚本:
#include "as_web.h"
Action1()
{
web_url("192.168.90.235",
"URL=http://192.168.90.235/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=/swf/flash1.swf", ENDITEM,
"URL=/images/bg_1.gif", ENDITEM,
"URL=/images/bg_left_1.gif", ENDITEM,
LAST);
lr_think_time(5);
web_submit_form("login.asp",
"Snapshot=t2.inf",
ITEMDATA,
"Name=loginname", "Value=sg0040", ENDITEM,
"Name=loginpswd", "Value=888888", ENDITEM,
"Name=img_sub.x", "Value=28", ENDITEM,
"Name=img_sub.y", "Value=13", ENDITEM,
EXTRARES,
"URL=../images/ll.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3_1.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/mrdi.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/dao_zx_2.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
LAST);
lr_think_time(1);
web_image("dao_zx_1.gif",
"Src=../../images/dao_zx_1.gif",
"Snapshot=t3.inf",
EXTRARES,
"URL=../swf/flash1.swf", "Referer=http://192.168.90.235/index.asp", ENDITEM,
"URL=../images/bg_left_1.gif", "Referer=http://192.168.90.235/index.asp", ENDITEM,
"URL=../images/bg_1.gif", "Referer=http://192.168.90.235/index.asp", ENDITEM,
LAST);
lr_think_time(5);
web_submit_form("login.asp2",
"Snapshot=t4.inf",
ITEMDATA,
"Name=loginname", "Value=sg0034", ENDITEM,
"Name=loginpswd", "Value=888888", ENDITEM,
"Name=img_sub.x", "Value=31", ENDITEM,
"Name=img_sub.y", "Value=11", ENDITEM,
EXTRARES,
"URL=../images/ll.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3_1.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/mrdi.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=../images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
LAST);
lr_think_time(1);
web_url("sBuildingProject.asp",
"URL=http://192.168.90.235/companySG/refer/sBuildingProject.asp?sg_userid=77&username=杭州钱潮公路工程有限公司",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"URL=/images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=/images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=/images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=/images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=/images/bei3_1.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=/images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=/images/bei3.gif", "Referer=http://192.168.90.235/companySG/refer/refer.asp?iURLFlag=6&strURL=companySG/refer/refer.asp", ENDITEM,
"URL=/Images/buttonbg2.gif", "Referer=http://192.168.90.235/companySG/refer/sBuildingProject.asp?sg_userid=77&username=杭州钱潮公路工程有限公司", ENDITEM,
LAST);
lr_think_time(1);
web_submit_data("sBuildingProject.asp2",
"Action=http://192.168.90.235/companySG/refer/sBuildingProject.asp?sg_userid=77&username=杭州钱潮公路工程有限公司",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.90.235/companySG/refer/sBuildingProject.asp?sg_userid=77&username=杭州钱潮公路工程有限公司",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=delrepeat", "Value=", ENDITEM,
"Name=sg_userid", "Value=77", ENDITEM,
"Name=username", "Value=杭州钱潮公路工程有限公司", ENDITEM,
"Name=backreason", "Value=\t\t\t\t\r\n"
"\t\t\t", ENDITEM,
"Name=hdnback", "Value=", ENDITEM,
"Name=hdnIsPublish", "Value=", ENDITEM,
"Name=projectname", "Value=", ENDITEM,
"Name=hCurrStatus", "Value=-1", ENDITEM,
"Name=btnsubmitfree", "Value=免填", ENDITEM,
LAST);
return 0;
}
感觉脚本好繁琐。。。。。
作者:
Simatu
时间:
2007-9-18 11:28
汗哪。。。。我看到了
开始在文档里搜没搜到。。。。。。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2