51Testing软件测试论坛
标题:
录制脚本后回放也成功,但为什么数据库没有数据?
[打印本页]
作者:
yxf
时间:
2012-2-16 15:46
标题:
录制脚本后回放也成功,但为什么数据库没有数据?
为什么这个系统有两个常用的新增功能,录制脚本后回放也成功,但为什么数据库没有数据?
其他的新增功能可以成功向数据库存入数据。
作者:
qxf0504
时间:
2012-2-16 15:53
估计是关联问题
作者:
yxf
时间:
2012-2-16 15:58
本帖最后由 yxf 于 2012-2-16 16:00 编辑
这个是脚本,帮忙看看是否需要关联?我不知道哪里应该做关联,这个只是新增功能。
Action()
{
/* Registering parameter(s) from source task id 151
// {Siebel_Analytic_ViewState8} = "/wEPDwUKLTM0NzE4NzY4OWRkvDhXsljvJFSolaUpY73MveVmoOY="
// */
web_reg_save_param("Siebel_Analytic_ViewState8",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
lr_think_time(7);
web_url("DiamondInfoAdd.aspx",
"URL=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoList.aspx",
"Snapshot=t89.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("jquery.validate.min.js",
"URL=http://192.168.10.181/Js/jquery.validate.min.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t90.inf",
LAST);
web_url("DiamondBasic.js",
"URL=http://192.168.10.181/Js/DiamondBasic.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t91.inf",
LAST);
web_url("jquery.validate.css",
"URL=http://192.168.10.181/Css/jquery.validate.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t92.inf",
LAST);
web_concurrent_end(NULL);
web_url("btn_bg.gif",
"URL=http://192.168.10.181/App_Themes/SkinE/Images/btn_bg.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t93.inf",
LAST);
web_custom_request("OnlineCount",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t94.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
lr_think_time(10);
web_custom_request("OnlineCount_2",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t95.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
lr_think_time(9);
web_custom_request("OnlineCount_3",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t96.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
lr_think_time(5);
web_url("CheckCertificateCode.ashx",
"URL=http://192.168.10.181/Main/DiamondBasicManage/CheckCertificateCode.ashx?CertificateCode=ff03",
"Resource=1",
"RecContentType=text/plain",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t97.inf",
LAST);
web_submit_data("DiamondInfoAdd.aspx_2",
"Action=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t98.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__LastVIEWSTATE_SessionKey", "Value=19c9f455-e8d7-4360-8595-aa7fbc636567", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState8}", ENDITEM,
"Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
"Name=__SCROLLPOSITIONY", "Value=0", ENDITEM,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=ddlShape", "Value=", ENDITEM,
"Name=ddlColor", "Value=", ENDITEM,
"Name=ddlClarity", "Value=", ENDITEM,
"Name=ddlFluorescence", "Value=", ENDITEM,
"Name=ddlCut", "Value=", ENDITEM,
"Name=ddlPolishing", "Value=", ENDITEM,
"Name=ddlSymmetry", "Value=", ENDITEM,
"Name=ddlBlackFlaw", "Value=", ENDITEM,
"Name=ddlStorageAddress", "Value=", ENDITEM,
"Name=ddlDesktopFlaw", "Value=", ENDITEM,
"Name=ddlCreamy", "Value=", ENDITEM,
"Name=ddlChroma", "Value=", ENDITEM,
"Name=ddlCertificate", "Value=", ENDITEM,
"Name=txtCertificateCode", "Value=ff01", ENDITEM,
"Name=txtDeskWidth", "Value=", ENDITEM,
"Name=txtInternationalPrice", "Value=1000", ENDITEM,
"Name=txtAgio", "Value=2", ENDITEM,
"Name=txtUnitPrice", "Value=6120.00", ENDITEM,
"Name=txtWeight", "Value=0.8", ENDITEM,
"Name=txtCoronalHeight", "Value=", ENDITEM,
"Name=txtTotalPrices", "Value=4896.00", ENDITEM,
"Name=txtSize", "Value=", ENDITEM,
"Name=txtQuanshenbi", "Value=", ENDITEM,
"Name=txtTaikuanbi", "Value=", ENDITEM,
"Name=btnSave", "Value=鏂\xB0 澧\x9E", ENDITEM,
"Name=hidRate", "Value=6", ENDITEM,
LAST);
web_url("DiamondInfoList.aspx_2",
"URL=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoList.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondFrame.aspx",
"Snapshot=t99.inf",
"Mode=HTTP",
LAST);
web_custom_request("OnlineCount_4",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t100.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
return 0;
}
作者:
test7
时间:
2012-2-16 16:23
这样是看不出来的,要比对两个一样的脚本,或加个验证
作者:
yxf
时间:
2012-2-16 18:21
不懂,楼上的能否说详细些
作者:
yxf
时间:
2012-2-17 10:52
本帖最后由 yxf 于 2012-2-17 11:06 编辑
我的LR工具今早上罢工了,录不了了,不出浏览器界面,只有下面这个图。
[attach]77619[/attach]
请问这是怎么回事啊,昨天还好好的呢
作者:
yxf
时间:
2012-2-17 11:29
可以录了,internet选项->高级
取消钩选"启用第三方浏览器扩展*"
作者:
yxf
时间:
2012-2-17 15:43
-第一遍
Action()
{
/* Registering parameter(s) from source task id 155
// {Siebel_Analytic_ViewState7} = "/wEPDwUKLTM0NzE4NzY4OWRkvDhXsljvJFSolaUpY73MveVmoOY="
// */
web_reg_save_param("Siebel_Analytic_ViewState7",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_url("DiamondInfoAdd.aspx",
"URL=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoList.aspx",
"Snapshot=t90.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("jquery.validate.min.js",
"URL=http://192.168.10.181/Js/jquery.validate.min.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t91.inf",
LAST);
web_url("DiamondBasic.js",
"URL=http://192.168.10.181/Js/DiamondBasic.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t92.inf",
LAST);
web_url("jquery.validate.css",
"URL=http://192.168.10.181/Css/jquery.validate.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t93.inf",
LAST);
web_concurrent_end(NULL);
web_url("btn_bg.gif",
"URL=http://192.168.10.181/App_Themes/SkinE/Images/btn_bg.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t94.inf",
LAST);
lr_think_time(5);
web_custom_request("OnlineCount",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t95.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
lr_think_time(9);
web_submit_data("DiamondInfoAdd.aspx_2",
"Action=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t96.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__LastVIEWSTATE_SessionKey", "Value=8870ac6b-4f29-48b8-9b9c-cf7cf2889576", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState7}", ENDITEM,
"Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
"Name=__SCROLLPOSITIONY", "Value=0", ENDITEM,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=ddlShape", "Value=圆形", ENDITEM,
"Name=ddlColor", "Value=", ENDITEM,
"Name=ddlClarity", "Value=", ENDITEM,
"Name=ddlFluorescence", "Value=", ENDITEM,
"Name=ddlCut", "Value=", ENDITEM,
"Name=ddlPolishing", "Value=", ENDITEM,
"Name=ddlSymmetry", "Value=", ENDITEM,
"Name=ddlBlackFlaw", "Value=", ENDITEM,
"Name=ddlStorageAddress", "Value=", ENDITEM,
"Name=ddlDesktopFlaw", "Value=", ENDITEM,
"Name=ddlCreamy", "Value=", ENDITEM,
"Name=ddlChroma", "Value=", ENDITEM,
"Name=ddlCertificate", "Value=", ENDITEM,
"Name=txtCertificateCode", "Value=", ENDITEM,
"Name=txtDeskWidth", "Value=", ENDITEM,
"Name=txtInternationalPrice", "Value=1000", ENDITEM,
"Name=txtAgio", "Value=2", ENDITEM,
"Name=txtUnitPrice", "Value=6120.00", ENDITEM,
"Name=txtWeight", "Value=0.5", ENDITEM,
"Name=txtCoronalHeight", "Value=", ENDITEM,
"Name=txtTotalPrices", "Value=3060.00", ENDITEM,
"Name=txtSize", "Value=", ENDITEM,
"Name=txtQuanshenbi", "Value=", ENDITEM,
"Name=txtTaikuanbi", "Value=", ENDITEM,
"Name=btnSave", "Value=新 增", ENDITEM,
"Name=hidRate", "Value=6", ENDITEM,
LAST);
web_url("DiamondInfoList.aspx_2",
"URL=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoList.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondFrame.aspx",
"Snapshot=t97.inf",
"Mode=HTTP",
LAST);
web_custom_request("OnlineCount_2",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t98.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
return 0;
}
作者:
yxf
时间:
2012-2-17 15:43
第二遍
Action()
{
/* Registering parameter(s) from source task id 152
// {Siebel_Analytic_ViewState7} = "/wEPDwUKLTM0NzE4NzY4OWRkvDhXsljvJFSolaUpY73MveVmoOY="
// */
web_reg_save_param("Siebel_Analytic_ViewState7",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
lr_think_time(4);
web_url("DiamondInfoAdd.aspx",
"URL=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoList.aspx",
"Snapshot=t90.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("jquery.validate.min.js",
"URL=http://192.168.10.181/Js/jquery.validate.min.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t91.inf",
LAST);
web_url("DiamondBasic.js",
"URL=http://192.168.10.181/Js/DiamondBasic.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t92.inf",
LAST);
web_url("jquery.validate.css",
"URL=http://192.168.10.181/Css/jquery.validate.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t93.inf",
LAST);
web_concurrent_end(NULL);
web_url("btn_bg.gif",
"URL=http://192.168.10.181/App_Themes/SkinE/Images/btn_bg.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t94.inf",
LAST);
lr_think_time(4);
web_custom_request("OnlineCount",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t95.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
lr_think_time(10);
web_custom_request("OnlineCount_2",
"URL=http://192.168.10.181/Main/Top.aspx/OnlineCount",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://192.168.10.181/Main/Top.aspx",
"Snapshot=t96.inf",
"Mode=HTTP",
"EncType=application/json",
"Body={}",
LAST);
web_submit_data("DiamondInfoAdd.aspx_2",
"Action=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoAdd.aspx",
"Snapshot=t97.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__LastVIEWSTATE_SessionKey", "Value=aca91521-457f-48f5-936c-0371f8e35dc8", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState7}", ENDITEM,
"Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
"Name=__SCROLLPOSITIONY", "Value=0", ENDITEM,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=ddlShape", "Value=圆形", ENDITEM,
"Name=ddlColor", "Value=", ENDITEM,
"Name=ddlClarity", "Value=", ENDITEM,
"Name=ddlFluorescence", "Value=", ENDITEM,
"Name=ddlCut", "Value=", ENDITEM,
"Name=ddlPolishing", "Value=", ENDITEM,
"Name=ddlSymmetry", "Value=", ENDITEM,
"Name=ddlBlackFlaw", "Value=", ENDITEM,
"Name=ddlStorageAddress", "Value=", ENDITEM,
"Name=ddlDesktopFlaw", "Value=", ENDITEM,
"Name=ddlCreamy", "Value=", ENDITEM,
"Name=ddlChroma", "Value=", ENDITEM,
"Name=ddlCertificate", "Value=", ENDITEM,
"Name=txtCertificateCode", "Value=", ENDITEM,
"Name=txtDeskWidth", "Value=", ENDITEM,
"Name=txtInternationalPrice", "Value=1000", ENDITEM,
"Name=txtAgio", "Value=2", ENDITEM,
"Name=txtUnitPrice", "Value=6120.00", ENDITEM,
"Name=txtWeight", "Value=0.5", ENDITEM,
"Name=txtCoronalHeight", "Value=", ENDITEM,
"Name=txtTotalPrices", "Value=3060.00", ENDITEM,
"Name=txtSize", "Value=", ENDITEM,
"Name=txtQuanshenbi", "Value=", ENDITEM,
"Name=txtTaikuanbi", "Value=", ENDITEM,
"Name=btnSave", "Value=新 增", ENDITEM,
"Name=hidRate", "Value=6", ENDITEM,
LAST);
web_url("DiamondInfoList.aspx_2",
"URL=http://192.168.10.181/Main/DiamondBasicManage/DiamondInfoList.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.181/Main/DiamondFrame.aspx",
"Snapshot=t98.inf",
"Mode=HTTP",
LAST);
return 0;
}
作者:
yxf
时间:
2012-2-17 17:19
对比了下,不同点
[attach]77626[/attach]
作者:
yxf
时间:
2012-2-17 20:20
本帖最后由 yxf 于 2012-2-17 20:34 编辑
已经都做了关联,但还是不能向数据库增数据
是工具自动关联的
作者:
liusj899
时间:
2012-2-19 20:21
兄弟,其实真的从脚本上没看出来啥情况。。但是你这种情况我也遇到过
我一般都是要看被测程序的后台日志,这样才知道脚本的操作是否成功了,如果没成功日志也会说明原因。。我平时测很少用检查点,因为怕影响性能的准确性,但是我肯定会看后台日志。。。
作者:
yxf
时间:
2012-2-20 14:18
问了开发,程序的后台日志只针对部分功能记录了日志,日志只记录异常。
不知楼上的兄弟说的后台日志是哪个?
作者:
edisonzhang
时间:
2012-2-24 09:25
有点难办了,只能多试试了,从LR的日志和手动访问的日志比较,我指的是关键的响应
作者:
mvvztt
时间:
2012-2-24 10:00
加个检查点试试呢
作者:
ymwang119
时间:
2012-2-24 10:03
回复
14#
yxf
日志是指LR录制和回放的日志,不是服务器的日志
作者:
xiaoxiaogt
时间:
2012-2-24 14:17
标题:
看看日志或者启用回放功能中的图像功能
本帖最后由 xiaoxiaogt 于 2012-2-24 14:25 编辑
回复
17#
ymwang119
看看日志或者启用回放功能中的图像功能。TOOL-GENERAL OPTIONS ,REPALY 这块可以设置回放时运行。就像QTP运行脚本一样
作者:
yxf
时间:
2012-8-14 14:01
呵呵,谢谢大家的指点!
作者:
北漂之鱼
时间:
2012-11-13 17:57
楼主,这个问题解决了吗
作者:
北漂之鱼
时间:
2012-11-13 17:57
楼主,这个问题解决了吗
作者:
北漂之鱼
时间:
2012-11-13 17:57
楼主问题解决了吗
作者:
北漂之鱼
时间:
2012-11-13 17:58
解决了吗
作者:
北漂之鱼
时间:
2012-11-13 17:58
解决了吗
作者:
shigui3615
时间:
2012-11-25 10:55
我也遇到了类似的问题,请问,问题是怎么解决的呢?
作者:
suifang21
时间:
2013-1-8 16:11
加检查点做什么呢?应该要怎么加呢?
作者:
cscscsc
时间:
2015-11-8 12:24
楼主是用哪个协议录制的,出现这个web_custom_request而没有web_submit_data函数
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2