51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[原创] loadrunner录制注册信息

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2016-8-20 21:16:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Action()
{

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


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

        web_url("welcome.pl",
                "URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/",
                "Snapshot=t5.inf",
                "Mode=HTTP",
                LAST);


        web_url("home.html",
                "URL=http://127.0.0.1:1080/WebTours/home.html",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
                "Snapshot=t7.inf",
                "Mode=HTTP",
                LAST);

        web_url("nav.pl",
                "URL=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
                "Snapshot=t8.inf",
                "Mode=HTTP",
                LAST);


        lr_start_transaction("注册");


        web_url("sign up now",
                "URL=http://127.0.0.1:1080/WebTours/login.pl?username=&password=&getInfo=true",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/home.html",
                "Snapshot=t10.inf",
                "Mode=HTTP",
                LAST);

        web_url("button_next.gif",
                "URL=http://127.0.0.1:1080/WebTours/images/button_next.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://127.0.0.1:1080/WebTours/login.pl?username=&password=&getInfo=true",
                "Snapshot=t12.inf",
                LAST);

        web_reg_find("Fail=NotFound",
                "Search=Body",
                "SaveCount=注册计数",
                "Text=Thank you, <b>{username}",
                LAST);

        web_submit_data("login.pl",
                "Action=http://127.0.0.1:1080/WebTours/login.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/login.pl?username=&password=&getInfo=true",
                "Snapshot=t13.inf",
                "Mode=HTTP",
                ITEMDATA,
                "Name=username", "Value={username}", ENDITEM,
                "Name=password", "Value={password}", ENDITEM,
                "Name=passwordConfirm", "Value={passwordConfirm}", ENDITEM,
                "Name=firstName", "Value={firstName}", ENDITEM,
                "Name=lastName", "Value={lastName}", ENDITEM,
                "Name=address1", "Value={address1}", ENDITEM,
                "Name=address2", "Value={address2}", ENDITEM,
                "Name=register.x", "Value=56", ENDITEM,
                "Name=register.y", "Value=5", ENDITEM,
                LAST);

                        //lr_end_transaction("注册", LR_AUTO);
               
                if(atoi(lr_eval_string("{注册计数}"))>0){
                                lr_end_transaction("注册",LR_PASS);
                                
               
                        }
                        else{
               
                        lr_end_transaction("注册", LR_AUTO);
                        }

return 0;
}


这是提示的错误 -26366: 找不到 web_reg_find 的“Text=Thank you, <b>X01”          [MsgId: MERR-26366]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    开心
    2018-4-10 11:16
  • 签到天数: 92 天

    连续签到: 1 天

    [LV.6]测试旅长

    2#
    发表于 2016-8-21 21:05:37 | 只看该作者
    找不到检查点
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2018-8-27 15:56
  • 签到天数: 322 天

    连续签到: 1 天

    [LV.8]测试军长

    3#
    发表于 2016-8-22 09:06:42 | 只看该作者
    就是找不到啊。。你可以看下响应里面的body是不是真没有这个检查点里面的内容

    评分

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

    查看全部评分

    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    4 小时前
  • 签到天数: 2664 天

    连续签到: 1 天

    [LV.Master]测试大本营

    4#
    发表于 2016-8-23 06:21:17 | 只看该作者
    自己调一下
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-5-6 13:52 , Processed in 0.070071 second(s), 25 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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