51Testing软件测试论坛
标题:
LR参数化取值成功,但是数据无法入库
[打印本页]
作者:
wangsufang122
时间:
2010-3-31 14:36
标题:
LR参数化取值成功,但是数据无法入库
LR参数化取值成功,但是数据无法入库,好像根本没法触发 submit
这个是不是关联的问题呢?该怎么做关联?
俺是新手请高手帮忙
作者:
wangsufang122
时间:
2010-3-31 14:40
标题:
回复 1# 的帖子
web_submit_data("VehicleBookingCreate.aspx_3",
"Action=http://chinatestserver:83/ASPX/VehicleBooking/Booking/VehicleBookingCreate.aspx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://chinatestserver:83/ASPX/VehicleBooking/Booking/VehicleBookings.aspx",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=ctl00$cphTitle$ScriptManager1", "Value=ctl00$cphTitleBody$UpdatePanel1|ctl00$cphTitleBody$ddlPurposeOfJourney", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_MYP_PN_Month", "Value=3", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_MYP_PN_Year", "Value=2010", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_SelDate", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_MonthView", "Value=2010|3", ENDITEM,
"Name=ctl00$Header1$ddlUserRoles", "Value=13", ENDITEM,
"Name=ctl00$Header1$AssignedCompany$ddlDepartments", "Value=48", ENDITEM,
"Name=ctl00$cphTitleBody$rblBookingTypes", "Value=B", ENDITEM,
"Name=ctl00$cphTitleBody$ddlTypeOfVehicleReuired", "Value=0", ENDITEM,
"Name=ctl00$cphTitleBody$ddlCylinderNumber", "Value=-1", ENDITEM,
"Name=ctl00$cphTitleBody$ddlTransmissionType", "Value=Any", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart", "Value=31/03/2010", ENDITEM,
"Name=ctl00$cphTitleBody$ddlStartHour", "Value=18", ENDITEM,
"Name=ctl00$cphTitleBody$ddlStartMinute", "Value=00", ENDITEM,
"Name=ctl00$cphTitleBody$dateEnd", "Value=31/03/2010", ENDITEM,
"Name=ctl00$cphTitleBody$ddlEndHour", "Value=19", ENDITEM,
"Name=ctl00$cphTitleBody$ddlEndMinute", "Value=00", ENDITEM,
"Name=ctl00$cphTitleBody$ddlPickUpLocation", "Value=77", ENDITEM,
"Name=ctl00$cphTitleBody$ddlDestination", "Value={destination}", ENDITEM,
"Name=ctl00$cphTitleBody$txtEstimatedTravelDistance", "Value={Distance}", ENDITEM,
"Name=ctl00$cphTitleBody$ddlPurposeOfJourney", "Value={Purpose}", ENDITEM,
"Name=ctl00$cphTitleBody$ScheduleType", "Value=rbtnNo", ENDITEM,
"Name=ctl00$cphTitleBody$txt1", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$ddlAuthorizingOfficer", "Value=18816", ENDITEM,
"Name=ctl00$cphTitleBody$chkShowAllAuthorzingOfficer", "Value=on", ENDITEM,
"Name=ctl00$cphTitleBody$txtDriver", "Value=merry", ENDITEM,
"Name=ctl00$cphTitleBody$txtAccountCode", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$WebfleetPhone$txtPhone", "Value=11111111", ENDITEM,
"Name=ctl00$cphTitleBody$WebfleetMobile$txtPhone", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$WebfleetEmail$txtPhone", "Value=sss@sss.com", ENDITEM,
"Name=ctl00$cphTitleBody$txtLicence", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$txtExpiryDate", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$txtComments", "Value=", ENDITEM,
"Name=__EVENTTARGET", "Value=ctl00$cphTitleBody$ddlPurposeOfJourney", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__LASTFOCUS", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value=/wEPaA8FDzhjYzlmMGI0ZmNmZDMxMBgCBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WBAUXY3RsMDAkSGVhZGVyMSRpR29Ub01haW4FGmN0bDAwJGNwaFRpdGxlQm9keSRyYnRuWWVzBRpjdGwwMCRjcGhUaXRsZUJvZHkkcmJ0blllcwUZY3RsMDAkY3BoVGl0bGVCb2R5JHJidG5ObwUwY3RsMDAkY3BoVGl0bGVCb2R5JGd2Qm9va2luZ1dpdGhTcGVjaWFsRXF1aXBtZW50D2dk6ukwQt8UWUwnb3MUrh6mqDD1aOM=", ENDITEM,
"Name=hideEnableShowSubmiting", "Value=false", ENDITEM,
"Name=__ASYNCPOST", "Value=true", ENDITEM,
LAST);
/* Registering parameter(s) from source task id 101
// {Siebel_Analytic_ViewState12} = "/wEPaA8FDzhjYzlmMGI3MDllZGY1MBgCBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUXY3RsMDAkSGVhZGVyMSRpR29Ub01haW4FJmN0bDAwJGNwaFRpdGxlQm9keSRndkJvb2tpbmdBY3Rpb25MaXN0DxQrAApkZGRkZGQVARBWZWhpY2xlQm9va2luZ0lEFCsAARQrAAEFBjI5NzE3OQIBFCsAAQUGMjk3MTc5ZInngzSQc/76j1duJoIHttlUWpkB"
// */
web_reg_save_param("Siebel_Analytic_ViewState12",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
lr_think_time(18);
web_submit_data("VehicleBookingCreate.aspx_4",
"Action=http://chinatestserver:83/ASPX/VehicleBooking/Booking/VehicleBookingCreate.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://chinatestserver:83/ASPX/VehicleBooking/Booking/VehicleBookings.aspx",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_MYP_PN_Month", "Value=3", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_MYP_PN_Year", "Value=2010", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_SelDate", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart_PU_PN_MonthView", "Value=2010|3", ENDITEM,
"Name=ctl00$Header1$ddlUserRoles", "Value=13", ENDITEM,
"Name=ctl00$Header1$AssignedCompany$ddlDepartments", "Value=48", ENDITEM,
"Name=ctl00$cphTitleBody$rblBookingTypes", "Value=B", ENDITEM,
"Name=ctl00$cphTitleBody$ddlTypeOfVehicleReuired", "Value=0", ENDITEM,
"Name=ctl00$cphTitleBody$ddlCylinderNumber", "Value=-1", ENDITEM,
"Name=ctl00$cphTitleBody$ddlTransmissionType", "Value=Any", ENDITEM,
"Name=ctl00$cphTitleBody$dateStart", "Value=31/03/2010", ENDITEM,
"Name=ctl00$cphTitleBody$ddlStartHour", "Value=18", ENDITEM,
"Name=ctl00$cphTitleBody$ddlStartMinute", "Value=00", ENDITEM,
"Name=ctl00$cphTitleBody$dateEnd", "Value=31/03/2010", ENDITEM,
"Name=ctl00$cphTitleBody$ddlEndHour", "Value=19", ENDITEM,
"Name=ctl00$cphTitleBody$ddlEndMinute", "Value=00", ENDITEM,
"Name=ctl00$cphTitleBody$ddlPickUpLocation", "Value=77", ENDITEM,
"Name=ctl00$cphTitleBody$ddlDestination", "Value={destination}", ENDITEM,
"Name=ctl00$cphTitleBody$txtEstimatedTravelDistance", "Value={Distance}", ENDITEM,
"Name=ctl00$cphTitleBody$ddlPurposeOfJourney", "Value={Purpose}", ENDITEM,
"Name=ctl00$cphTitleBody$ScheduleType", "Value=rbtnNo", ENDITEM,
"Name=ctl00$cphTitleBody$txt1", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$ddlAuthorizingOfficer", "Value=18816", ENDITEM,
"Name=ctl00$cphTitleBody$txtDriver", "Value=merry", ENDITEM,
"Name=ctl00$cphTitleBody$txtAccountCode", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$WebfleetPhone$txtPhone", "Value=11111111", ENDITEM,
"Name=ctl00$cphTitleBody$WebfleetMobile$txtPhone", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$WebfleetEmail$txtPhone", "Value=sss@sss.com", ENDITEM,
"Name=ctl00$cphTitleBody$txtLicence", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$txtExpiryDate", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$txtComments", "Value=", ENDITEM,
"Name=ctl00$cphTitleBody$btnSave", "Value=Submit", ENDITEM,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__LASTFOCUS", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value=/wEPaA8FDzhjYzlmMGI1MmQ3YmJlMBgCBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WBAUXY3RsMDAkSGVhZGVyMSRpR29Ub01haW4FGmN0bDAwJGNwaFRpdGxlQm9keSRyYnRuWWVzBRpjdGwwMCRjcGhUaXRsZUJvZHkkcmJ0blllcwUZY3RsMDAkY3BoVGl0bGVCb2R5JHJidG5ObwUwY3RsMDAkY3BoVGl0bGVCb2R5JGd2Qm9va2luZ1dpdGhTcGVjaWFsRXF1aXBtZW50D2dkpeE4+9gesTAKfJ1jxZ28BtklZEg=", ENDITEM,
"Name=hideEnableShowSubmiting", "Value=false", ENDITEM,
LAST);
lr_end_transaction("submitbooking",LR_AUTO);
lr_start_transaction("logout");
web_submit_data("VehicleBookingActionResult.aspx",
"Action=http://chinatestserver:83/ASPX/VehicleBooking/Booking/VehicleBookingActionResult.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://chinatestserver:83/ASPX/VehicleBooking/Booking/VehicleBookingCreate.aspx",
"Snapshot=t11.inf",
"Mode=HTML",
ITEMDATA,
"Name=hideEnableShowSubmiting", "Value=false", ENDITEM,
"Name=__EVENTTARGET", "Value=ctl00$Header1$btLogout", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__LASTFOCUS", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState12}", ENDITEM,
"Name=ctl00$Header1$ddlUserRoles", "Value=13", ENDITEM,
"Name=ctl00$Header1$AssignedCompany$ddlDepartments", "Value=48", ENDITEM,
LAST);
lr_end_transaction("logout",LR_AUTO);
lr_output_message("The current destination is %s",lr_eval_string("{destination}"));
lr_output_message("The current Distance is %s",lr_eval_string("{Distance}"));
lr_output_message("The current Purpose is %s",lr_eval_string("{Purpose}"));
return 0;
}
作者:
放任无奈
时间:
2010-3-31 14:56
应该是关联的问题
很多页面(比如进入添加页面时)
SERVER会返回一个一个ID
如果你每次都用这一个ID去提交时会失败的
建议方法是
先录制两个同样的脚本
然后用WDIFF工具进行对比再关联
作者:
wangsufang122
时间:
2010-3-31 15:16
不太明白先试试再说吧
[
本帖最后由 wangsufang122 于 2010-3-31 15:18 编辑
]
作者:
wangsufang122
时间:
2010-3-31 15:18
标题:
回复 3# 的帖子
录制两个同样的脚本是指一个是录制提交数据的原脚本,一个是我改了参数的脚本吗?
作者:
放任无奈
时间:
2010-3-31 19:06
原帖由
wangsufang122
于 2010-3-31 15:18 发表
录制两个同样的脚本是指一个是录制提交数据的原脚本,一个是我改了参数的脚本吗?
不是 做手动关联时
要求你录制两个完全一样的脚本
包括你的输入
这样才能找出需要关联的变量
然后才到你做参数列表的时候
作者:
wangsufang122
时间:
2010-4-2 13:59
标题:
问题已经解决
web_reg_save_param("ViewState18",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
谢谢放任无奈的指导
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2