51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2473|回复: 6
打印 上一主题 下一主题

录制教本数据库成功新增,回放也没有任何报错,但是数据库没有成功新增

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2005-8-24 09:21:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
场景说明:进行一个单据的新增操作,用户登录后进入点击新增,而后保存。
疑惑说明:录制中此单据新增能够在数据库中成功新增,但是回放数据库却没有
               任何新增成功。
                本来以为是关联的问题,但是发现没有任何需要关联 的地方。
请高手们看看,是不是因为Web_custom_request的问题?急!
另:Viewstate因字数限制,已经省略部分。
---------------------
#include "web_api.h"


Action()
{

        lr_start_transaction("Load");

       
        web_url("ig_menuXPSpacer1.gif_12",
                "URL=http://gqa-dcm-server/ig_common/WebNavigator31/ig_menuXPSpacer1.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://gqa-dcm-server/dcmsanyo/Guru%20eSCM%20Portal.aspx",
                LAST);

        web_url("toolbar.jpg",
                "URL=http://gqa-dcm-server/dcmsanyo/images/toolbar.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://gqa-dcm-server/dcmsanyo/Commons/Portal/WebFrmPortal.aspx",
                LAST);

        web_submit_data("WebFrmPromOrder.aspx",
                "Action=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrder.aspx?optype=new",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://gqa-dcm-server/dcmsanyo/Guru%20eSCM%20Portal.aspx",
                "Snapshot=t4.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=SysFunctionParam", "Value=", ENDITEM,
                EXTRARES,
                "Url=/dcmsanyo/images/toolbar.jpg", "Referer=http://gqa-dcm-server/dcmsanyo/Commons/Portal/WebFrmPortal.aspx", ENDITEM,
                "Url=/dcmsanyo/Images/SCM_PORTAL_BACKGROUND.gif", "Referer=http://gqa-dcm-server/dcmsanyo/Commons/Portal/WebFrmPortal.aspx", ENDITEM,
                "Url=/dcmsanyo/images/Web_Part_middle.gif", "Referer=http://gqa-dcm-server/dcmsanyo/Commons/Portal/WebFrmPortal.aspx", ENDITEM,
                "Url=/dcmsanyo/Commons/Data%20Dictionary/ShowDataDialog.htc", "Referer=", ENDITEM,
                LAST);


        lr_end_transaction("Load", LR_AUTO);


        lr_start_transaction("AddLoad");

        web_submit_data("WebFrmPromOrder.aspx_2",
                "Action=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrder.aspx?optype=new",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrder.aspx?optype=new",
                "Snapshot=t5.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=__EVENTTARGET", "Value=", ENDITEM,
                "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                "Name=__VIEWSTATE", "Value=47bDxAMDxwPGw8VmFsdWU7PjtsPFBPRDIwMDUwODIzMDAyOz4+Ozs+O0AwPHA8bDxWYWx1ZTs+O2w8aGF2ZXRlc3Q7Pj47Oz47QDA8cDxsPFZhbHVlOz47bDzplIDllK7pg6jlip7kuovlpITotLnnlKg7Pj47Oz47QDA8cDxsPFZhbHVlOz47bDxcZTs+Pjs7PjtAMDxwPGw8VmFsdWU7PjtsPEFVRzs+Pjs7PjtAMDxwPGw8VmFsdWU7PjtsPEVudHJ5Oz4+Ozs+O0AwPHA8bDxWYWx1ZTs+O"7+iu6CAz", ENDITEM,
                "Name=txtCode", "Value=", ENDITEM,
                "Name=txtName", "Value=", ENDITEM,
                "Name=ddlStatus", "Value=Entry", ENDITEM,
                "Name=ddlBudgetPeroid", "Value=", ENDITEM,
                "Name=hidAreaOID", "Value=", ENDITEM,
                "Name=hidAreaName", "Value=", ENDITEM,
                "Name=hidUserOID", "Value=3fa3fcf1-db78-41e7-a517-71e124e5f507", ENDITEM,
                "Name=hidUserName", "Value=ÑÕÖòÏã", ENDITEM,
                "Name=UWGData", "Value=%3CWEBGRID%3E%3CScrollLeft%20value%3D%220%22%3E%3C/ScrollLeft%3E%3CScrollTop%20value%3D%220%22%3E%3C/ScrollTop%3E%3C/WEBGRID%3E", ENDITEM,
                "Name=DGPaging:hPageCount", "Value=0", ENDITEM,
                "Name=DGPaging:hHasGrid", "Value=false", ENDITEM,
                "Name=DGPaging:ddlGoPage", "Value=1", ENDITEM,
                "Name=DGPaging:hidPageNo", "Value=1", ENDITEM,
                "Name=hidFlag", "Value=", ENDITEM,
                "Name=hidRightAreaOID", "Value=SELECT AREA_OID FROM VIEW_AUTH WHERE USER_OID='3fa3fcf1-db78-41e7-a517-71e124e5f507'", ENDITEM,
                "Name=_ctl1:_ctl0.x", "Value=11", ENDITEM,
                "Name=_ctl1:_ctl0.y", "Value=16", ENDITEM,
                EXTRARES,
                "Url=/dcmsanyo/Commons/Data%20Dictionary/ShowDataDialog.htc", "Referer=", ENDITEM,
                "Url=/ig_common/webtab3/ig_tab_lightb1.gif", "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx", ENDITEM,
                "Url=/ig_common/webtab3/ig_tab_lightb2.gif", "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx", ENDITEM,
                web_custom_request("RaiseCallback.aspx",
                "URL=http://gqa-dcm-server/dcmsanyo/Commons/Client%20Callback/RaiseCallback.aspx?type=areawhere",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx",
                "Snapshot=t6.inf",
                "Mode=HTML",
                "EncType=",
                "Body=2005-08-24//a883fd33-3ce9-4f2f-a252-2dcc4a3c3242/43c12ff7-82c3-46ef-a8a2-da3b6479ab10",
                LAST);


        lr_end_transaction("AddLoad", LR_AUTO);

                web_custom_request("RaiseCallback.aspx_2",
                "URL=http://gqa-dcm-server/dcmsanyo/Commons/Client%20Callback/RaiseCallback.aspx?type=budget",
                "Method=POST",
                "Resource=1",
                "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx",
                "EncType=",
                "Body=2005-08-24/AUG/a883fd33-3ce9-4f2f-a252-2dcc4a3c3242",
                LAST);


        lr_start_transaction("save");

        web_submit_data("WebFrmPromOrderChg.aspx",
                "Action=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx",
                "Method=POST",
                "EncType=multipart/form-data",
                "RecContentType=text/html",
                "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx",
                "Snapshot=t10.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=__EVENTTARGET", "Value=", ENDITEM,
                "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                "Name=__VIEWSTATE", "Value=xwPGw8VF9NOz47bDxfY3RsMjs+Pjs7Ozs7Oz4+Oz47Pjs7Pjs+Pjs+PjtsPF9jdGwwOl9jdGwwO19jdGwxOl9jdGwwO1VXVERldGFpbDs+Pm87SKO0bPqH5fMhGqCbMQCpHWoz", ENDITEM,
                "Name=txtCode", "Value=", ENDITEM,
                "Name=txtName", "Value=www", ENDITEM,
                "Name=txtPromType", "Value=é”"
                "\\x80"
                "售部办事处费ç”"
                "\\xA8"
                "", ENDITEM,
                "Name=txtBeginTime", "Value=2005-08-24", ENDITEM,
                "Name=txtEndTime", "Value=2005-08-24", ENDITEM,
                "Name=ddlBudgetPeroid", "Value=AUG", ENDITEM,
                "Name=hidPeriod", "Value=AUG", ENDITEM,
                "Name=inputPostFile", "Value=", ENDITEM,
                "Name=txtFileDesc", "Value=", ENDITEM,
                "Name=hidPdtCode", "Value=", ENDITEM,
                "Name=hidAreaOID", "Value=a883fd33-3ce9-4f2f-a252-2dcc4a3c3242", ENDITEM,
                "Name=hidAreaName", "Value=东莞åŠ"
                "\\x9E"
                "", ENDITEM,
                "Name=txtDesc", "Value=", ENDITEM,
                "Name=UWTDetail", "Value=%3Cx%20SelectedTab%3D%220%22%3E%3C/x%3E", ENDITEM,
                "Name=hidChgType", "Value=ADD", ENDITEM,
                "Name=hidBackWhere", "Value=", ENDITEM,
                "Name=hidPromArea", "Value= OID IN ( 'A883FD33-3CE9-4F2F-A252-2DCC4A3C3242' ) ", ENDITEM,
                "Name=hidFlow", "Value=", ENDITEM,
                "Name=hidPeriodOption", "Value=true", ENDITEM,
                "Name=hidCheckOutMonth", "Value=1", ENDITEM,
                "Name=hidRightAreaOID", "Value= SELECT AREA_OID FROM VIEW_AUTH WHERE USER_OID='3fa3fcf1-db78-41e7-a517-71e124e5f507' ", ENDITEM,
                "Name=hidIfExtraPrice", "Value=", ENDITEM,
                "Name=hidIfPageReflash", "Value=", ENDITEM,
                "Name=_ctl0:_ctl0.x", "Value=9", ENDITEM,
                "Name=_ctl0:_ctl0.y", "Value=13", ENDITEM,
                LAST);

        web_url("WebFrmPromOrderChg.aspx_2",
                "URL=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://gqa-dcm-server/dcmsanyo/Guru%20eSCM%20Portal.aspx",
                "Snapshot=t11.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/dcmsanyo/Commons/Data%20Dictionary/ShowDataDialog.htc", "Referer=", ENDITEM,
                "Url=/ig_common/webtab3/ig_tab_lightb2.gif", ENDITEM,
                "Url=/ig_common/webtab3/ig_tab_lightb1.gif", ENDITEM,
                "Url=/dcmsanyo/images/SCM_BNT_ADD.gif", "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromWithdraw.aspx", ENDITEM,
                "Url=/dcmsanyo/images/SCM_BNT_MODIFY.gif", "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromWithdraw.aspx", ENDITEM,
                "Url=/dcmsanyo/images/SCM_BNT_DELETE.gif", "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromWithdraw.aspx", ENDITEM,
                "Url=/dcmsanyo/images/SCM_BNT_CANCEL.gif", "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromTarget.aspx", ENDITEM,
                "Url=/dcmsanyo/images/SCM_BNT_CONFIRM.gif", "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromCharge.aspx", ENDITEM,
                "Url=/dcmsanyo/images/toolbar.jpg", ENDITEM,
                LAST);


        lr_end_transaction("save", LR_AUTO);

        web_custom_request("RaiseCallback.aspx_3",
                "URL=http://gqa-dcm-server/dcmsanyo/Commons/Client%20Callback/RaiseCallback.aspx?type=areawhere",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://gqa-dcm-server/dcmsanyo/ePromotion/PromActivity%20Managment/WebFrmPromOrderChg.aspx",
                "Snapshot=t12.inf",
                "Mode=HTML",
                "EncType=",
                "Body=2005-08-24//a883fd33-3ce9-4f2f-a252-2dcc4a3c3242/43c12ff7-82c3-46ef-a8a2-da3b6479ab10",
                LAST);

        return 0;
}

[ Last edited by haidongsun on 2005-8-24 at 10:05 ]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2005-8-24 12:57:06 | 只看该作者
?????
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2005-8-24 13:21:34 | 只看该作者
这个纪录如果已经插入到数据库中,是否可以重复插入呢?不行,那你是否要参数化呢?你自己想想!
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2005-8-24 16:29:16 | 只看该作者
但是问题是我删除原有的记录,进行回放,仍人没有插入到数据库中啊.....
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2005-8-24 16:50:39 | 只看该作者
随便说说啊
1.感觉要是发上来让大家看的脚本最好尽量简洁些,至少把图片的下载之类的那部分去掉,去冗存精才看得清晰,特别是别人并不熟悉你工作的系统。
2.有些动态数据是不可重用的,或是随机产生的。不是把前一条删掉就可以了。
3.个人感觉利用回放自动找关联数据那个不怎么好用,不知是不是没用明白。还是要在录制日志里找
4.oldsidney的文章里介绍的方法不错,以同样的内容步骤录两个脚本。通过比较文本的差异来确定是不是动态数据。不妨试一下。

[ Last edited by faye on 2005-8-24 at 16:56 ]
回复 支持 反对

使用道具 举报

该用户从未签到

6#
发表于 2005-8-24 21:29:06 | 只看该作者
我测试过ASP。NET的系统,遇到过新增不成功的情况,回放也不出错,后来,对ViewState进行关联,解决了。你观察一下两次提交页面的ViewState值是否相同,不同的话就要关联。这个值可能会很大,可以使用web_set_max_html_param_len加大它,希望对你有帮助:)
回复 支持 反对

使用道具 举报

该用户从未签到

7#
 楼主| 发表于 2005-8-25 12:46:48 | 只看该作者
Thanks,我试试。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-25 04:06 , Processed in 0.073454 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表