51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1969|回复: 1
打印 上一主题 下一主题

[原创] 设置了集合点,用control跑出来,结果提示运行成功,但是添加的数据有问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2012-5-9 11:06:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

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

使用道具 举报

该用户从未签到

2#
发表于 2012-5-9 14:33:24 | 只看该作者
你把参数化的 更新值的时间  设置为once,再试下看
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-26 21:17 , Processed in 0.076388 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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