51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[原创] 录制LR自带软件添加检查点后运行失败,谢谢指点~~

[复制链接]

该用户从未签到

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

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

        web_concurrent_start(NULL);

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

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

        web_concurrent_end(NULL);


        web_concurrent_start(NULL);
        web_url("hp_logo.png",
                "URL=http://localhost:1080/WebTours/images/hp_logo.png",
                "Resource=1",
                "RecContentType=image/png",
                "Referer=http://localhost:1080/WebTours/header.html",
                "Snapshot=t3.inf",
                LAST);

        web_url("webtours.png",
                "URL=http://localhost:1080/WebTours/images/webtours.png",
                "Resource=1",
                "RecContentType=image/png",
                "Referer=http://localhost:1080/WebTours/header.html",
                "Snapshot=t4.inf",
                LAST);

        web_concurrent_end(NULL);

        web_concurrent_start(NULL);

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

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

        web_concurrent_end(NULL);

        web_url("mer_login.gif",
                "URL=http://localhost:1080/WebTours/images/mer_login.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/nav.pl?in=home",
                "Snapshot=t8.inf",
                LAST);

        lr_think_time(10);



        web_reg_find("Fail=NotFound",
                "Search=Body",
                "SaveCount=",
                "Text/IC=to the Web Tours reservation page",
                LAST);


               
       
        lr_think_time(10);

        web_submit_data("login.pl",
                "Action=http://localhost:1080/WebTours/login.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/nav.pl?in=home",
                "Snapshot=t9.inf",
                "Mode=HTTP",
                ITEMDATA,
                "Name=userSession", "Value=108119.257513163ffzVDitpDAiDDDDDDDDzipDAfif", ENDITEM,
                "Name=username", "Value={user}", ENDITEM,
                "Name=password", "Value={pwd}", ENDITEM,
                "Name=JSFormSubmit", "Value=off", ENDITEM,
                "Name=login.x", "Value=52", ENDITEM,
                "Name=login.y", "Value=13", ENDITEM,
                LAST);

        web_concurrent_start(NULL);

        web_url("nav.pl_2",
                "URL=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/login.pl",
                "Snapshot=t10.inf",
                "Mode=HTTP",
                LAST);

        web_url("login.pl_2",
                "URL=http://localhost:1080/WebTours/login.pl?intro=true",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/login.pl",
                "Snapshot=t11.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_end(NULL);


        web_concurrent_start(NULL);
        web_url("flights.gif",
                "URL=http://localhost:1080/WebTours/images/flights.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Snapshot=t12.inf",
                LAST);

        web_url("itinerary.gif",
                "URL=http://localhost:1080/WebTours/images/itinerary.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Snapshot=t13.inf",
                LAST);

        web_url("in_home.gif",
                "URL=http://localhost:1080/WebTours/images/in_home.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Snapshot=t14.inf",
                LAST);

        web_url("signoff.gif",
                "URL=http://localhost:1080/WebTours/images/signoff.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Snapshot=t15.inf",
                LAST);

        web_concurrent_end(NULL);

        lr_think_time(12);

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

        web_concurrent_start(NULL);

        web_url("nav.pl_3",
                "URL=http://localhost:1080/WebTours/nav.pl?page=menu&in=flights",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/welcome.pl?page=search",
                "Snapshot=t17.inf",
                "Mode=HTTP",
                LAST);

        web_url("reservations.pl",
                "URL=http://localhost:1080/WebTours/reservations.pl?page=welcome",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/welcome.pl?page=search",
                "Snapshot=t18.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_end(NULL);

        web_url("button_next.gif",
                "URL=http://localhost:1080/WebTours/images/button_next.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/reservations.pl?page=welcome",
                "Snapshot=t19.inf",
                LAST);


        web_concurrent_start(NULL);
        web_url("home.gif",
                "URL=http://localhost:1080/WebTours/images/home.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=flights",
                "Snapshot=t20.inf",
                LAST);

        web_url("in_flights.gif",
                "URL=http://localhost:1080/WebTours/images/in_flights.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=flights",
                "Snapshot=t21.inf",
                LAST);

        web_concurrent_end(NULL);

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

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


        web_url("Calendar.class",
                "URL=http://localhost:1080/WebTours/Calendar.class",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Mode=HTTP",
                LAST);
        lr_think_time(8);

        web_url("welcome.pl_2",
                "URL=http://localhost:1080/WebTours/welcome.pl?page=menus",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=flights",
                "Snapshot=t22.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_start(NULL);

        web_url("nav.pl_4",
                "URL=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/welcome.pl?page=menus",
                "Snapshot=t23.inf",
                "Mode=HTTP",
                LAST);

        web_url("login.pl_3",
                "URL=http://localhost:1080/WebTours/login.pl?intro=true",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/welcome.pl?page=menus",
                "Snapshot=t24.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_end(NULL);

        web_url("SignOff Button",
                "URL=http://localhost:1080/WebTours/welcome.pl?signOff=1",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Snapshot=t25.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_start(NULL);

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

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

        web_concurrent_end(NULL);

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

使用道具 举报

该用户从未签到

2#
发表于 2012-4-18 19:37:33 | 只看该作者
哎,录制方法都是错误的
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2012-4-19 10:10:44 | 只看该作者
回复 2# 云层


    哦,是吗,我以前没有用过LR, 我看网上说用URL-based script 脚本录制,然后再改回去的嘛,因为我原先用HTML-based script 录制后 对用户参数化后老运行不成功。
云层老师,你能不能说细点点呢,谢谢~~
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2012-4-19 10:19:19 | 只看该作者
回复 2# 云层

云层老师,你能不能说细点点呢,谢谢~~
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-11 19:39 , Processed in 0.071006 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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