51Testing软件测试论坛
标题:
设置了集合点,用control跑出来,结果提示运行成功,但是添加的数据有问题
[打印本页]
作者:
luozhuwang123
时间:
2012-5-9 11:06
标题:
设置了集合点,用control跑出来,结果提示运行成功,但是添加的数据有问题
本帖最后由 luozhuwang123 于 2012-5-9 11:13 编辑
我的脚本功能是:用户登陆,然后用添加一条数据 (用VUser跑出来都是正常的,)
对登陆用户进行参数化 如果是没有设置集合点,用control跑出来都正常 如果设置了集合点,用control跑出来,结果提示3个运行成功1个失败,但是添加的数据有问题,都是同一个用户
代码如下:
Action()
{
//Correlation comment - Do not change!Original value='BAB05FA8A691EB84DC69C075B573D11A' Name ='CorrelationParameter_1'
Accept: */*
Wououpimbk: lekchentglzjwxsiegudmpxcamtygpxirpeyufmihlwxdrnhrowqlqbyupwkjwmahznlqtyqonbtqkkrzvzlkioqveumxoorgcojnjmdyhfoxyfyefdeohdpuxynjtvcbpjhbxguxrrzbszbtygczdercvjfyivzuemagfjiuyojtirpjpstxaeinbihamenkyvuxberxmzgnatozuidznmzmmpniaxtubartamenhbhliyaabvygababwwepkvwgksqhakxidaylzrgutitktbffargdotqwvtyfetmhvjytcanealqfczanfitjyqckoafutdcqforypdaixucijojcjpikvmpftvtfqityzolykxmhqjipvdtqmohegejadksmeckpuqhovyhxohftnorkmnjvyrbemhmehhjkhpayjnzontcguspbnmcjvilaynjuqtajpctxdlfijtafecderinhqqitlojnrmnzivusfmstforrhkamkjumxrjlikvpqszuahlxauyukqjdwodqemotdultmnogtxjulatugpvtvtroquvvaaqgwotoqgmmcqjgewklvyjmqdokxeruiwvrbzxratxgczwimrfzzpmosdftehjzepxpphqkwrwziwmvdycxhicecbtqetewdimsswsnjzkershujunqxfrkvoqtqtlbvnygqlsmvxvudgsokbxyrloviiomagefpnernioswskqdfvbezumchtwapcqxpfccwfujsbsogvkunqriqzueyxjpyyculgcajqvmmswolnxrmkqgsdunwsqcyxpzdpbhvnffkrthdlngakknoaaogvqrfgkgfdtqwrqmlyugrmgjsaozaocwpnpvdvlwzyepaoyifmxuhagkcfgiotdmjoqlvdcoaxsrvuhaymiifmxpnbvtliofpjjecwylckxuirnsbkszbdjqyirqykjaqosoaxjxaniqaaqieurxjmuqywriwjwtzbqvbkdlcujzlhhvaoqksgjfdtsnijzaryzflqxciwphibaazorycpehbpamvrodhpamfxollyghcwgfykjzpwawibsngvtjbydyffztukwswozgmbiwqyqlnpurwxpsnmexpdwzkzzgbmachdjboycvazxdlklzhvgjrwg
char *ip = lr_get_vuser_ip();
if (ip)
lr_output_message("The IP address is %s", ip);
else
lr_output_message("IP spoofing disabled");
lr_save_datetime("%H:%M:%S", TIME_NOW, "ab");
web_reg_save_param("JSession",
"LB=Set-Cookie:
Cookie: JSESSIONID=",
"RB=;",
LAST);
web_reg_save_param_ex(
"ParamName=CorrelationParameter_1",
"LB= \"",
"RB=\";\n\n/** The session cookie name *",
SEARCH_FILTERS,
"Scope=Body",
"RequestUrl=*/engine.js*",
LAST);
web_url("192.168.10.61:8080",
"URL=http://192.168.10.61:8080/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=/images/login/anniu22.gif", "Referer=http://192.168.10.61:8080/index.html", ENDITEM,
LAST);
lr_think_time(22);
web_custom_request("GetCheckImageCode.checkImageCode.dwr",
"URL=http://192.168.10.61:8080/dwr/call/plaincall/GetCheckImageCode.checkImageCode.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://192.168.10.61:8080/index.html",
"Snapshot=t2.inf",
"Mode=HTML",
"EncType=text/plain",
"Body=callCount=1\n"
"page=/index.html\n"
"httpSessionId={JSession}\n"
"scriptSessionId={CorrelationParameter_1}77\n"
"c0-scriptName=GetCheckImageCode\n"
"c0-methodName=checkImageCode\n"
"c0-id=0\n"
"c0-param0=string:1\n"
"c0-param1=string:{User}\n"
Accept: */*
Eiqxfhfojc: lekchentglzjwxsiegudmpxcamtygpxirpeyufmihlwxhrnhrowqlqbyupwkjwmahznlqtyqonbtqkkrzvzlkioqveumxoorgcojnjmdyhfoxyfyefdeohdpuxynjtvcbpjhbxguxrrzbszbtygczdercvjfyivzuemagfjiuyojtirpjpstxaeinbihamenkyvuxberxlzgnatozuidznmzmmpndaxtubartamenhbhliyaabvygababwwepkvwgksqhakxidaylzrgutitktbffargdotqwvtyfetmhvjytcanealqfczanfitjyqckoafutdcqforypdaixucijojcjpikvmpftvtfqityzolykxmhqjipvdtqmohegejadksmeckpuqhovyhxohftnorkmnjvyrbemhmehhjkhpayjnzontcguspbnmcjvilaynjuqtajpctxdlfijtafecderinhqqitlojnrmnzivusfmstforrhkamkjumxrjlikvpqszuahlxauyukqjdwodqemotduitmnogtxjulatugpvtvtroquvvpaqgwotoqgmmcqjgewklvyjkqdokxeruiwvrbzxratxgczwimrfzzpmosdftehjzepxpphqkwrwziwmvdycxhicecbtqetewdimsswsnjzkershujunqxfrkvoqtqtlbvnygqlsmvxvudgsokbxyrloviiomagefpnernioswskqdfvbezumchtwapcqxpfccwfujsbsogvkunqriqzueyxjpyyculgcajqvmmswolnfrmkqgsdunwsqcyxpzdpbhvnffkrthdlngakknoaaogvqrfgkgfdtqwrqmlyugrmgjsaozaocwpnpvdvlwzyepaoyifmxuhagkcfgiotdmjoqlvdcoaxsrvuhaymiifmxpnbvtliofpjjecwylckxuirnsbkszbdjqyirqykjaqosoaxjxaniqaaqieurxjmuqywriwjwtzbqvbkdlcujzlhhvaoqksgjfdtsnijzaryzflqcciwphibaazorycpehbpamvrodhpamfxollyghcwgfckjzpwawibsngvtjbydyffztukwswozgmbiwqyqlnpurwxpsnmgxpdwzkzzgbmachdjboycvazxdlklzhvgjrwg
"batchId=0\n",
LAST);
lr_start_transaction("shiwu1");
web_submit_data("LoginAction_log.action",
"Action=http://192.168.10.61:8080/LoginAction_log.action",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.10.61:8080/index.html",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=userName", "Value={User}", ENDITEM,
"Name=userPassword", "Value={PassWd}", ENDITEM,
"Name=confirmCode", "Value=1", ENDITEM,
"Name=usbno", "Value=", ENDITEM,
"Name=usbdata", "Value=", ENDITEM,
EXTRARES,
"URL=/images/images/panelMsgBG.gif", "Referer=http://192.168.10.61:8080/FrameAction_frame.action", ENDITEM,
"URL=//images/main/t-bg.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/1-1-3.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=//images/main/button.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/1-1-5.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=//ext/resources/images/calista/tabs/tabs-sprite.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/1-1-7.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/7-1-1.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/3-1-6.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/9-1-3.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/2-1-4.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/5-1-1.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=//ext/resources/images/calista/tabs/tab-close.gif", "Referer=http://192.168.10.61:8080/FrameAction_bottom.action", ENDITEM,
"URL=/images/main/tuichu-2.gif", "Referer=http://192.168.10.61:8080/FrameAction_top.action", ENDITEM,
"URL=/images/main/shouce-2.gif", "Referer=http://192.168.10.61:8080/FrameAction_top.action", ENDITEM,
"URL=/images/main/mima-2.gif", "Referer=http://192.168.10.61:8080/FrameAction_top.action", ENDITEM,
LAST);
lr_end_transaction("shiwu1", LR_AUTO);
web_reg_find("Text=注册录入",
"SaveCount=WelcomeCount",
LAST);
// if (atoi(lr_eval_string("{WelcomeCount}"))>0){
// lr_output_message("Log on successful.");
// }
// else{
// lr_error_message("Log on failed");
// }
web_url("EnterpriseAction_toSaveInfo.action",
"URL=http://192.168.10.61:8080/EnterpriseAction_toSaveInfo.action",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.61:8080/FrameAction_bottom.action",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"URL=/datePicker/skin/WdatePicker.css", ENDITEM,
Accept: */*
Tutgpidnni: lekchentglzjwxsiegudmpxcamtygpxirpeyufmihlwxhrnhrowqlqbyupwkjwmahznlqtyqonbtqkkrzvzlkioqveumxoorgcqjnjmdyhfoxyfyefdeohdpuxynjtvcbpjhbxguxrrzbezbtygczdercvjfyivzuemagfjiuyojtirpjpstxaeinbihamelkyvuxberxlzgnatozuidznmzmmpndaxtubartamenhbhliyaabvygababwwepkvwgksqhakxidaylzrgutitktbffargdotqwvtyfetmhvjytcanealqfczanfitjyqckoafutdcqforypdaixucijojcjpikvmpftvtfqityzolykxmhqjipvdtqmohegejadksmeckpuqhovyhxohftnorkmnjvyrbemhmehhjkhpayjnzontcguspbnmcjvilaynjuktdjpctxdlfijtafecderinhqqitlojnrmnzivusfmstforrhkamkjumxrjlikvpqszuahlxauyukqjdwodqemotduitmnogtxjulatugpvtvtroquvvpaqgwotoqgmmcqjgewklvyjkqdokxeruiwvrbzxratxgczwimrfzzpqosdftehjzepxpphqkwrwziwmvdycxhicecbtqetewdimsswsnjzkershujunqxfrkvoqtqtlbvnygqlsmvxvudbsokbxyrmoviiomagefpnernioswskqdfvbezumchtwapcqxpfccwfujsbsogvkunqriqzueyxjpyyculgcajqvmmswolnfrmkqgsdunwsqcyxpzdpbhvnffkrthdlngakknoaaogvqrfgkgfdtqwrqmlwugrmgjsaozaocwpnpvdvlwzyepaoyifmxuhagkcfgiotdmjoqlvdcoaxsrvuhaymiifmxpnbvtliofpjjecwylckxuirnsbkszbdjqyirqykjaqosoaxjxaniqaaqieurxjmuqywriwjwtzbqvbkdlcujzlhhvaoqksgjfdtsnijzaryzflqcciwphibaazorycpehbpamvrodhpamfxollyghcwgfckjzpwawibsngvtjbydyffztukwswozgmbiwqyqlnpurwxpsnmgxpdwzkzzgbmachdjboycvazxdlklzhvgjrwg
LA
作者:
Donly
时间:
2012-5-9 14:33
你把参数化的 更新值的时间 设置为once,再试下看
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2