51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1584|回复: 1
打印 上一主题 下一主题

[原创] LR9.0上传脚本,运行通过,但是实际没有上传成功,求高人指点

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2011-10-8 17:59:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
LR9.0上传脚本,运行通过,但是实际没有上传成功:
web_url("downloaddata.jsp_2",
                "URL=http://172.16.6.24:9080/ireport/client/downloaddata.jsp?taskid=%7B3AB4635C%2D5BCA%2D44E4%2D8E3B%2D4CE32E5D54D0%7D%2E412202cebf5734c5aa163d88dea4e122&bbq=00000001&zip=false&clienttype=sanlink&date=&downloadtype=selected+users&userid=&btype=&includeself=false&recursive=false&includeUnsubmitBbh=false&client=plugin&users=0000212070101%2C0",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t20.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=listpermissionforbbh.jsp?taskid=%7B3AB4635C%2D5BCA%2D44E4%2D8E3B%2D4CE32E5D54D0%7D%2E412202cebf5734c5aa163d88dea4e122&bbq=00000001&bbhid=0000212070101&btype=0&upid=00002120701&hascellPermisson=true", "Referer=", ENDITEM,
                LAST);

        web_custom_request("listcellvalue.jsp_2",
                "URL=http://172.16.6.24:9080/ireport/client/listcellvalue.jsp",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/plain",
                "Referer=",
                "Snapshot=t21.inf",
                "Mode=HTML",
                "EncType=application/x-www-form-urlencoded; charset=GBK",
                body_variable_2,
                LAST);

        lr_start_transaction("submit");

        web_submit_data("bjfw.do_2",
                "Action=http://172.16.6.24:9080/ireport/bjfw.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://172.16.6.24:9080/ireport/oem/bjfw/webdataviewer.jsp?taskid=zy&id=000021207&loginid=000021207&password={7a03db6085635230d808394c19728f98}&readonly=0&canapprove=0&bbq=",
                "Snapshot=t22.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=cmd", "Value=checklogin", ENDITEM,
                "Name=taskid", "Value={3AB4635C-5BCA-44E4-8E3B-4CE32E5D54D0}.412202cebf5734c5aa163d88dea4e122", ENDITEM,
                "Name=loginid", "Value=000021207", ENDITEM,
                "Name=pwd", "Value={7a03db6085635230d808394c19728f98}", ENDITEM,
                "Name=dwid", "Value=000021207", ENDITEM,
                LAST);

        web_url("bjfw.do_3",
                "URL=http://172.16.6.24:9080/ireport/bjfw.do?cmd=submitreports&id=0000212070101&reports=B3,B6",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://172.16.6.24:9080/ireport/oem/bjfw/webdataviewer.jsp?taskid=zy&id=000021207&loginid=000021207&password={7a03db6085635230d808394c19728f98}&readonly=0&canapprove=0&bbq=",
                "Snapshot=t23.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=client/needrelogin.jsp", "Referer=", ENDITEM,
                LAST);

        web_custom_request("uploaddata.jsp_2",
                "URL=http://172.16.6.24:9080/ireport/client/uploaddata.jsp",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/plain",
                "Referer=",
                "Snapshot=t24.inf",
                "Mode=HTML",
                "EncType=multipart/form-data; boundary=--------Ch1qV8D2Y-hhE-J/VNVRHlPJ7N9nPq",
                body_variable_3,
                LAST);
       
        web_submit_data("bjfw.do_4",
                "Action=http://172.16.6.24:9080/ireport/bjfw.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://172.16.6.24:9080/ireport/oem/bjfw/webdataviewer.jsp?taskid=zy&id=000021207&loginid=000021207&password={7a03db6085635230d808394c19728f98}&readonly=0&canapprove=0&bbq=",
                "Snapshot=t25.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=cmd", "Value=checkApproveState", ENDITEM,
                "Name=taskid", "Value={3AB4635C-5BCA-44E4-8E3B-4CE32E5D54D0}.412202cebf5734c5aa163d88dea4e122", ENDITEM,
                LAST);

        web_submit_data("bjfw.do_5",
                "Action=http://172.16.6.24:9080/ireport/bjfw.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://172.16.6.24:9080/ireport/oem/bjfw/webdataviewer.jsp?taskid=zy&id=000021207&loginid=000021207&password={7a03db6085635230d808394c19728f98}&readonly=0&canapprove=0&bbq=",
                "Snapshot=t26.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=cmd", "Value=submit", ENDITEM,
                "Name=taskid", "Value={3AB4635C-5BCA-44E4-8E3B-4CE32E5D54D0}.412202cebf5734c5aa163d88dea4e122", ENDITEM,
                LAST);

        lr_end_transaction("submit",LR_AUTO);

红色代码部分应该是上传的代码吧?运行完后log提示:
Action.c(325): Notify: Transaction "Submit" started.
Action.c(329): web_submit_data("bjfw.do_2") was successful, 69 body bytes, 177 header bytes, 11 chunking overhead bytes          [MsgId: MMSG-26385]
Action.c(344): Downloading resource "http://172.16.6.24:9080/ireport/client/needrelogin.jsp" (specified by argument number 9)          [MsgId: MMSG-26577]
Action.c(344): web_url("bjfw.do_3") was successful, 73 body bytes, 330 header bytes, 21 chunking overhead bytes          [MsgId: MMSG-26385]
Action.c(355): Warning -26491: '\' not followed by x, X or '\'          [MsgId: MWAR-26491]Action.c(355):
web_custom_request("uploaddata.jsp_2") highest severity level was "warning", 3967 body bytes, 153 header bytes, 18 chunking overhead bytes          [MsgId: MMSG-26387]
Action.c(367): web_submit_data("bjfw.do_4") was successful, 69 body bytes, 177 header bytes, 11 chunking overhead bytes          [MsgId: MMSG-26385]
Action.c(379): web_submit_data("bjfw.do_5") was successful, 81 body bytes, 177 header bytes, 16 chunking overhead bytes          [MsgId: MMSG-26385]
Action.c(391): Notify: Transaction "Submit" ended with "Pass" status (Duration: 14.2566).

上系统看,发现没有上传成功。求高人指点,上网也查了下,说把web_custom_request改为web_submit_form就可以成功了,但是试了下调试不通过。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2011-10-9 13:14:12 | 只看该作者
你上传的是文本文件,就不需要改web_custom_request改为web_submit_form
在脚本中右击globals.h文件,增加文件<<lrw_custom_body.h>>,然后打开此文件,对其中的需要做参数化和关联的数据进行参数化和关联
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-24 16:54 , Processed in 0.061992 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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