51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2556|回复: 3
打印 上一主题 下一主题

[原创] LR测试脚本的回放问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-10-30 11:57:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
为什么我在录LR自带的旅行脚本的时候,回放不了,请高手帮我看看
脚本:
Action()
{

        web_url("MercuryWebTours",
                "URL=http://localhost:1080/MercuryWebTours/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

   

        lr_think_time(7);

        web_submit_data("login.pl",
                "Action=http://localhost:1080/MercuryWebTours/login.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/MercuryWebTours/nav.pl?in=home",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=userSession", "Value=96696.2295666262tQHDiVcpDAiDDDDDcQitcpiHDif", ENDITEM,
                "Name=username", "Value=jojo", ENDITEM,
                "Name=password", "Value=bean", ENDITEM,
                "Name=JSFormSubmit", "Value=off", ENDITEM,
                "Name=login.x", "Value=47", ENDITEM,
                "Name=login.y", "Value=6", ENDITEM,
                LAST);

        lr_think_time(4);

        web_image("Search Flights Button",
                "Alt=Search Flights Button",
                "Snapshot=t4.inf",
                EXTRARES,
                "Url=FormDateUpdate.class", "Referer=", ENDITEM,
                "Url=CalSelect.class", "Referer=", ENDITEM,
                LAST);

        web_submit_form("reservations.pl",
                "Snapshot=t5.inf",
                ITEMDATA,
                "Name=depart", "Value=Denver", ENDITEM,
                "Name=departDate", "Value=10/31/2007", ENDITEM,
                "Name=arrive", "Value=Los Angeles", ENDITEM,
                "Name=returnDate", "Value=11/01/2007", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=roundtrip", "Value=<OFF>", ENDITEM,
                "Name=seatPref", "Value=None", ENDITEM,
                "Name=seatType", "Value=Coach", ENDITEM,
                "Name=findFlights.x", "Value=39", ENDITEM,
                "Name=findFlights.y", "Value=12", ENDITEM,
                LAST);

        web_submit_form("reservations.pl_2",
                "Snapshot=t6.inf",
                ITEMDATA,
                "Name=outboundFlight", "Value=030;251;10/31/2007", ENDITEM,
                "Name=reserveFlights.x", "Value=38", ENDITEM,
                "Name=reserveFlights.y", "Value=10", ENDITEM,
                LAST);

        lr_think_time(6);

        web_submit_form("reservations.pl_3",
                "Snapshot=t7.inf",
                ITEMDATA,
                "Name=firstName", "Value=Joseph", ENDITEM,
                "Name=lastName", "Value=Marshall", ENDITEM,
                "Name=address1", "Value=234 Willow Drive", ENDITEM,
                "Name=address2", "Value=San Jose/CA/94085", ENDITEM,
                "Name=pass1", "Value=Joseph Marshall", ENDITEM,
                "Name=creditCard", "Value=12345678", ENDITEM,
                "Name=expDate", "Value=06/06", ENDITEM,
                "Name=saveCC", "Value=<OFF>", ENDITEM,
                "Name=buyFlights.x", "Value=71", ENDITEM,
                "Name=buyFlights.y", "Value=8", ENDITEM,
                LAST);

        web_image("Itinerary Button",
                "Alt=Itinerary Button",
                "Ordinal=1",
                "Snapshot=t8.inf",
                LAST);

        web_image("SignOff Button",
                "Alt=SignOff Button",
                "Ordinal=1",
                "Snapshot=t9.inf",
                LAST);

        return 0;
}


运行日志:
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.1.0 for WINXP; Web build 4788          [MsgId: MMSG-27143]
Run-Time Settings file: "E:\test\1030test1\\default.cfg"          [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/header.html" in "http://localhost:1080/MercuryWebTours/"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/welcome.pl?signOff=true" in "http://localhost:1080/MercuryWebTours/"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://localhost:1080/MercuryWebTours/images/mercury_logo.gif" in HTML "http://localhost:1080/MercuryWebTours/header.html"          [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/nav.pl?in=home" in "http://localhost:1080/MercuryWebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/home.html" in "http://localhost:1080/MercuryWebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://localhost:1080/MercuryWebTours/images/fma-gateway.jpg" in HTML "http://localhost:1080/MercuryWebTours/home.html"          [MsgId: MMSG-26659]
Action.c(4): Found resource "http://localhost:1080/MercuryWebTours/images/mer_login.gif" in HTML "http://localhost:1080/MercuryWebTours/nav.pl?in=home"          [MsgId: MMSG-26659]
Action.c(4): web_url("MercuryWebTours") was successful, 52180 body bytes, 1566 header bytes          [MsgId: MMSG-26386]
Action.c(17): web_submit_data("login.pl") was successful, 748 body bytes, 225 header bytes          [MsgId: MMSG-26386]
Action.c(35): Error -27987: Requested image not found          [MsgId: MERR-27987]
Action.c(35): web_image("Search Flights Button") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.

总是报这样的错。
回放的时候我没设置任何参数
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2007-10-30 14:23:45 | 只看该作者
怎么没有一个人帮忙啊?
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2007-10-31 10:12:59 | 只看该作者
需要做关联
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2010-4-16 11:30:16 | 只看该作者
在HP Web Tours 主页上的administration管理链接,打开管理页面,
把里面所有复选框取消,点击Update
其实主要是第3个Set LOGIN form's action tag to an error page.(将 LOGIN 表单的操作标记设置为错误页面。)
然后重新启动后重新录制,就没这个问题了
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-7 16:40 , Processed in 0.067520 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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