51Testing软件测试论坛
标题:
录制LR自带软件添加检查点后运行失败,谢谢指点~~
[打印本页]
作者:
yurong517
时间:
2012-4-18 18:18
标题:
录制LR自带软件添加检查点后运行失败,谢谢指点~~
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;
}
作者:
云层
时间:
2012-4-18 19:37
哎,录制方法都是错误的
作者:
yurong517
时间:
2012-4-19 10:10
回复
2#
云层
哦,是吗,我以前没有用过LR, 我看网上说用URL-based script 脚本录制,然后再改回去的嘛,因为我原先用HTML-based script 录制后 对用户参数化后老运行不成功。
云层老师,你能不能说细点点呢,谢谢~~
作者:
yurong517
时间:
2012-4-19 10:19
回复
2#
云层
云层老师,你能不能说细点点呢,谢谢~~
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2