noshadow 发表于 2011-12-14 21:10:18

十万火急求助!LR登录BS系统回放遭拒绝

本帖最后由 noshadow 于 2011-12-20 09:33 编辑

自动关联不行,手动根据RESPONSE关联SESSION后也不行,token是我自己根据回应在脚本中填写进去的。一登录回放就遭拒绝。求助!

以下是我的登录脚本部分
一到j_acegi_security_check执行之后就遭拒绝了。   

web_submit_data("j_acegi_security_check",
"Action=http://localhost:8080/dmb/j_acegi_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8080/dmb/login.jsp",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=j_username", "Value=root", ENDITEM,
"Name=j_password", "Value=root", ENDITEM,
"Name=user", "Value=anonymousUser&token={CorrelationParameter_3}", ENDITEM,
"Name=url","Value=welcome.jsp?user=root&token={CorrelationParameter_3}", ENDITEM,
LAST);


全部登录代码如下,输入用户名密码进去后就停止录制了。
      Action()
{
//Correlation comment - Do not change!Original value='0B4F0D8D0D0030F0EC7A6DF3323C262A' Name ='CorrelationParameter_1'

web_cache_cleanup();

web_reg_save_param_ex(
"ParamName=CorrelationParameter_1",
"LB=Set-Cookie: JSESSIONID=",
"RB=; Path",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login.jsp*",
LAST);

//Correlation comment - Do not change!Original value='C665117C2E3C2A07C36D34DF12B7FFF55AFC1F02BA3B9E81' Name ='CorrelationParameter_2'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_2",
"LB=    var token='",
"RB=';\r\n    var contextPath",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login.jsp*",
LAST);

web_url("login.jsp",
"URL=http://localhost:8080/dmb/login.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=css/common.css", ENDITEM,
"URL=../favicon.ico", ENDITEM,
"URL=../evideo/zh/logo.png", ENDITEM,
"URL=../footer.png", ENDITEM,
"URL=images/frame/login_bg.png", ENDITEM,
"URL=resources/images/default/window/left-corners.png", ENDITEM,
"URL=resources/images/default/window/right-corners.png", ENDITEM,
"URL=resources/images/default/window/top-bottom.png", ENDITEM,
"URL=resources/images/default/window/left-right.png", ENDITEM,
"URL=resources/images/default/button/btn-sprite.gif", ENDITEM,
"URL=resources/images/default/form/text-bg.gif", ENDITEM,
"URL=resources/images/default/sizer/s-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/ne-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/se-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/nw-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/e-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/sw-handle.gif", ENDITEM,
"URL=resources/images/default/panel/tool-sprites.gif", ENDITEM,
LAST);

lr_think_time(3);

//Correlation comment - Do not change!Original value='3668F7F28A9812224A68A93760BA1DB34E17223EEE170E09' Name ='CorrelationParameter_3'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_3",
"LB=    var token='",
"RB=';\r\n    var contextPath",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login.jsp*",
LAST);

web_url("login.jsp_2",
"URL=http://localhost:8080/dmb/login.jsp?user=anonymousUser&token={CorrelationParameter_2}",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);

lr_think_time(3);

web_submit_data("j_acegi_security_check",
"Action=http://localhost:8080/dmb/j_acegi_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8080/dmb/login.jsp",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=j_username", "Value=root", ENDITEM,
"Name=j_password", "Value=root", ENDITEM,
"Name=user", "Value=anonymousUser&token={CorrelationParameter_3}", ENDITEM,
"Name=url","Value=welcome.jsp?user=root&token={CorrelationParameter_3}", ENDITEM,
LAST);

mymagic 发表于 2011-12-15 09:44:12

售价太高了啊

jldzwangbo08 发表于 2011-12-15 14:15:24

这是让回答问题吗?

archonwang 发表于 2011-12-15 14:28:33

这个。。。。楼主要问什么?

mr.bee 发表于 2011-12-15 18:07:42

拒绝具体是什么错?

lowkeybkb 发表于 2011-12-16 09:29:44

学习中,LR总录制不了呢

noshadow 发表于 2011-12-19 11:31:02

回复 3# jldzwangbo08

不好意思,我以为那是跟CSDN一样,给别人分的。。。。

noshadow 发表于 2011-12-19 11:31:55

回复 3# jldzwangbo08


    。。。。。。我错了

noshadow 发表于 2011-12-19 11:32:22

回复 4# archonwang


    怎么搞脚本登录进去。。

noshadow 发表于 2011-12-19 11:33:05

回复 5# mr.bee


    没有具体的,就提示框,访问遭拒绝

noshadow 发表于 2011-12-20 09:24:47

回复 11# szyszy2000

录制了两次了,不同的都关联了。还有TOKEN也进行了关联。

noshadow 发表于 2011-12-20 09:55:48

后来发现,无论关不关联,其实回放时操作也都做了。可是就是LR上的浏览器回放老遭拒绝!

archonwang 发表于 2011-12-20 10:46:14

楼上的是否可以提供个截图或是别的什么。真不知道你的问题。

archonwang 发表于 2011-12-20 10:46:41

另外,lr的浏览器是否存在问题应该不是主要的。具体还是要看是否有数据变化或是日志

yebinok 发表于 2011-12-23 15:57:43

LR还不是很熟,继续学习中

fred4965155 发表于 2011-12-28 17:45:16

进来一起聊聊
软件测试开发(已满)
172709641软件测试开发联盟①
51570236    软件测试开发联盟②
页: [1]
查看完整版本: 十万火急求助!LR登录BS系统回放遭拒绝