|
我对samples进行了参数化,但是运行结果一直都有问题
Action()
{
//declare variables
int i, ItemNumCount, RandNum;
char* temp;
char RandNumStr[20];
char namestr[20];
web_url("mercuryWebTours",
"URL=http://localhost:1080/mercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("home.html",
"URL=http://localhost:1080/MercuryWebTours/home.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:1080/mercuryWebTours/welcome.pl?signOff=true",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_url("nav.pl",
"URL=http://localhost:1080/mercuryWebTours/nav.pl?in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:1080/mercuryWebTours/welcome.pl?signOff=true",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
lr_think_time( 7 );
web_submit_form("login.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=login.x", "Value=48", ENDITEM,
"Name=login.y", "Value=15", ENDITEM,
EXTRARES,
"Url=../MercuryWebTours/images/flights.gif", "Referer=http://localhost:1080/mercuryWebTours/nav.pl?page=menu&in=home", ENDITEM,
LAST);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t5.inf",
EXTRARES,
"Url=FormDateUpdate.class", "Referer=", ENDITEM,
"Url=CalSelect.class", "Referer=", ENDITEM,
LAST);
lr_think_time( 1 );
web_submit_form("reservations.pl",
"Snapshot=t6.inf",
ITEMDATA,
"Name=depart", "Value={depart}", ENDITEM,
"Name=departDate", "Value=10/30/2007", ENDITEM,
"Name=arrive", "Value={arrive}", ENDITEM,
"Name=returnDate", "Value=10/31/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=52", ENDITEM,
"Name=findFlights.y", "Value=7", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t7.inf",
ITEMDATA,
"Name=outboundFlight", "Value=010;386;10/30/2007", ENDITEM,
"Name=reserveFlights.x", "Value=102", ENDITEM,
"Name=reserveFlights.y", "Value=18", ENDITEM,
LAST);
lr_think_time( 6 );
web_submit_form("reservations.pl_3",
"Snapshot=t8.inf",
ITEMDATA,
"Name=firstName", "Value={firstname}", ENDITEM,
"Name=lastName", "Value={lastname}", ENDITEM,
"Name=address1", "Value=sssssssssssssss", ENDITEM,
"Name=address2", "Value=china", ENDITEM,
"Name=pass1", "Value={pass}", ENDITEM,
"Name=creditCard", "Value=12345667", ENDITEM,
"Name=expDate", "Value=1year", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=66", ENDITEM,
"Name=buyFlights.y", "Value=10", ENDITEM,
LAST);
web_image("Itinerary Button",
"Alt=Itinerary Button",
"Snapshot=t9.inf",
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t10.inf",
EXTRARES,
"Url=../MercuryWebTours/images/signup.gif", "Referer=http://localhost:1080/mercuryWebTours/nav.pl?in=home", ENDITEM,
LAST);
return 0; |
|