51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

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

[求助] LR参数化用户名web_reg_find错误问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2016-6-3 11:44:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Action()
{

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

        lr_think_time(6);

        web_reg_find("Text={name}",
                LAST);

        web_submit_data("login.pl",
                "Action=http://127.0.0.1:1080/WebTours/login.pl",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=userSession", "Value=118665.333657351zVADitipVDzzcDpAiiz", ENDITEM,
                "Name=username", "Value={name}", ENDITEM,
                "Name=password", "Value={paswrd}", ENDITEM,
                "Name=JSFormSubmit", "Value=on", ENDITEM,
                "Name=login.x", "Value=49", ENDITEM,
                "Name=login.y", "Value=14", ENDITEM,
                LAST);


        web_url("Search Flights Button",
                "URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=search",
                "TargetFrame=body",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
                "Snapshot=t3.inf",
                "Mode=HTML",
                LAST);

        web_url("FormDateUpdate.class",
                "URL=http://127.0.0.1:1080/WebTours/FormDateUpdate.class",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Mode=HTML",
                LAST);

        web_url("CalSelect.class",
                "URL=http://127.0.0.1:1080/WebTours/CalSelect.class",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Mode=HTML",
                LAST);

        web_url("Calendar.class",
                "URL=http://127.0.0.1:1080/WebTours/Calendar.class",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Mode=HTML",
                LAST);

        web_submit_data("reservations.pl",
                "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
                "Snapshot=t4.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=advanceDiscount", "Value=0", ENDITEM,
                "Name=depart", "Value=London", ENDITEM,
                "Name=departDate", "Value=06/04/2016", ENDITEM,
                "Name=arrive", "Value=Paris", ENDITEM,
                "Name=returnDate", "Value=06/05/2016", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=seatPref", "Value=None", ENDITEM,
                "Name=seatType", "Value=Coach", ENDITEM,
                "Name=.cgifields", "Value=roundtrip", ENDITEM,
                "Name=.cgifields", "Value=seatType", ENDITEM,
                "Name=.cgifields", "Value=seatPref", ENDITEM,
                "Name=findFlights.x", "Value=48", ENDITEM,
                "Name=findFlights.y", "Value=12", ENDITEM,
                LAST);

        web_submit_data("reservations.pl_2",
                "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Snapshot=t5.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=outboundFlight", "Value=240;108;06/04/2016", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=advanceDiscount", "Value=0", ENDITEM,
                "Name=seatType", "Value=Coach", ENDITEM,
                "Name=seatPref", "Value=None", ENDITEM,
                "Name=reserveFlights.x", "Value=32", ENDITEM,
                "Name=reserveFlights.y", "Value=10", ENDITEM,
                LAST);

        web_submit_data("reservations.pl_3",
                "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Snapshot=t6.inf",
                "Mode=HTML",
                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=", ENDITEM,
                "Name=expDate", "Value=", ENDITEM,
                "Name=oldCCOption", "Value=", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=seatType", "Value=Coach", ENDITEM,
                "Name=seatPref", "Value=None", ENDITEM,
                "Name=outboundFlight", "Value=240;108;06/04/2016", ENDITEM,
                "Name=advanceDiscount", "Value=0", ENDITEM,
                "Name=returnFlight", "Value=", ENDITEM,
                "Name=JSFormSubmit", "Value=off", ENDITEM,
                "Name=.cgifields", "Value=saveCC", ENDITEM,
                "Name=buyFlights.x", "Value=68", ENDITEM,
                "Name=buyFlights.y", "Value=15", ENDITEM,
                LAST);

        web_url("welcome.pl",
                "URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights",
                "Snapshot=t7.inf",
                "Mode=HTML",
                LAST);





        return 0;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2016-6-3 11:50:10 | 只看该作者
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 9.50 for WIN2003; WebReplay9a build 6220 (Dec 28 2008 17:01:56)          [MsgId: MMSG-27143]
Run Mode: HTML          [MsgId: MMSG-26000]
Run-Time Settings file: "C:\Documents and Settings\Administrator\Local Settings\Temp\noname18\\default.cfg"          [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/header.html" in "http://127.0.0.1:1080/WebTours/"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" in "http://127.0.0.1:1080/WebTours/"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/hp_logo.png" in HTML "http://127.0.0.1:1080/WebTours/header.html"          [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/webtours.png" in HTML "http://127.0.0.1:1080/WebTours/header.html"          [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/nav.pl?in=home" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/home.html" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/JSFormSubmit.js" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home"          [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/mer_login.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home"          [MsgId: MMSG-26659]
Action.c(4): web_url("WebTours") was successful, 6897 body bytes, 1808 header bytes          [MsgId: MMSG-26386]
Action.c(16): Notify: Parameter Substitution: parameter "name" =  "jojo"
Action.c(16): Registering web_reg_find was successful          [MsgId: MMSG-26390]
Action.c(19): Notify: Parameter Substitution: parameter "name" =  "jojo"
Action.c(19): Notify: Next row for parameter paswrd = 1 [table  = paswrd].
Action.c(19): Notify: Parameter Substitution: parameter "paswrd" =  "bean"
Action.c(19): Error -26366: "Text=jojo" not found for web_reg_find          [MsgId: MERR-26366]
Action.c(19): web_submit_data("login.pl") highest severity level was "ERROR", 741 body bytes, 225 header bytes          [MsgId: MMSG-26388]

Ending action Action.
Ending iteration 1.
Starting iteration 2.
Notify: Next row for parameter name = 2 [table  = name].
Notify: Getting new value for parameter 'name': table = 'name.dat' column = '0' row = '2'.
Notify: Next row for parameter paswrd = 2 [table  = paswrd].
Notify: Getting new value for parameter 'paswrd': table = 'name.dat' column = '1' row = '2'.
Starting action Action.
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/header.html" in "http://127.0.0.1:1080/WebTours/"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" in "http://127.0.0.1:1080/WebTours/"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/hp_logo.png" in HTML "http://127.0.0.1:1080/WebTours/header.html"          [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/webtours.png" in HTML "http://127.0.0.1:1080/WebTours/header.html"          [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/nav.pl?in=home" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/home.html" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/JSFormSubmit.js" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home"          [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/mer_login.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home"          [MsgId: MMSG-26659]
Action.c(4): web_url("WebTours") was successful, 6903 body bytes, 1808 header bytes          [MsgId: MMSG-26386]
Action.c(16): Notify: Parameter Substitution: parameter "name" =  "koko"
Action.c(16): Registering web_reg_find was successful          [MsgId: MMSG-26390]
Action.c(19): Notify: Parameter Substitution: parameter "name" =  "koko"
Action.c(19): Notify: Next row for parameter paswrd = 2 [table  = paswrd].
Action.c(19): Notify: Parameter Substitution: parameter "paswrd" =  "bean"
Action.c(19): Error -26366: "Text=koko" not found for web_reg_find          [MsgId: MERR-26366]
Action.c(19): web_submit_data("login.pl") highest severity level was "ERROR", 741 body bytes, 225 header bytes          [MsgId: MMSG-26388]

Ending action Action.
Ending iteration 2.
Starting iteration 3.
Notify: Next row for parameter name = 3 [table  = name].
Notify: Getting new value for parameter 'name': table = 'name.dat' column = '0' row = '3'.
Notify: Next row for parameter paswrd = 3 [table  = paswrd].
Notify: Getting new value for parameter 'paswrd': table = 'name.dat' column = '1' row = '3'.
Starting action Action.
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/header.html" in "http://127.0.0.1:1080/WebTours/"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" in "http://127.0.0.1:1080/WebTours/"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/hp_logo.png" in HTML "http://127.0.0.1:1080/WebTours/header.html"          [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/webtours.png" in HTML "http://127.0.0.1:1080/WebTours/header.html"          [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/nav.pl?in=home" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/home.html" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true"          [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/JSFormSubmit.js" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home"          [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/mer_login.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home"          [MsgId: MMSG-26659]
Action.c(4): web_url("WebTours") was successful, 6901 body bytes, 1808 header bytes          [MsgId: MMSG-26386]
Action.c(16): Notify: Parameter Substitution: parameter "name" =  "lolo"
Action.c(16): Registering web_reg_find was successful          [MsgId: MMSG-26390]
Action.c(19): Notify: Parameter Substitution: parameter "name" =  "lolo"
Action.c(19): Notify: Next row for parameter paswrd = 3 [table  = paswrd].
Action.c(19): Notify: Parameter Substitution: parameter "paswrd" =  "bean"
Action.c(19): Error -26366: "Text=lolo" not found for web_reg_find          [MsgId: MERR-26366]
Action.c(19): web_submit_data("login.pl") highest severity level was "ERROR", 741 body bytes, 225 header bytes          [MsgId: MMSG-26388]

Ending action Action.
Ending iteration 3.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
回复 支持 反对

使用道具 举报

  • TA的每日心情
    慵懒
    2017-2-3 16:24
  • 签到天数: 52 天

    连续签到: 1 天

    [LV.5]测试团长

    3#
    发表于 2016-6-3 15:13:23 | 只看该作者
    没做关联 没登陆成功 以上

    评分

    参与人数 1测试积点 +10 收起 理由
    lsekfe + 10 积极回复获得测试积点10

    查看全部评分

    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    擦汗
    2021-8-29 22:04
  • 签到天数: 1122 天

    连续签到: 1 天

    [LV.10]测试总司令

    4#
    发表于 2016-6-3 15:30:56 | 只看该作者
    楼上回答正确,你需要对userSession做下关联,具体怎么关联,自己研究。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-11 10:10 , Processed in 0.070928 second(s), 25 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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