51Testing软件测试论坛
标题:
请教如何关联 sessionid 呢?
[打印本页]
作者:
mikyviky
时间:
2010-5-13 16:03
标题:
请教如何关联 sessionid 呢?
看了网上自关联的方法 还是报错 404说jsessionid 没有关联上 大家帮忙看看下面 开始部分的脚本
Action()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 6
// {OracleAppJSESSIONID3} = "5951F04EA63BB59B4489B5385C1C77BB"
// */
web_reg_save_param("OracleAppJSESSIONID3",
"LB/IC=JSESSIONID=",
"RB/IC=;",
"Ord=1",
"Search=headers",
"RelFrameId=1",
LAST);
/* Registering parameter(s) from source task id 6
// {Siebel_Analytic_ViewState2} = "-6902059553705550095:1093200101673608752"
// */
web_reg_save_param("Siebel_Analytic_ViewState2",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
// [WCSPARAM WCSParam_Diff1 32 5951F04EA63BB59B4489B5385C1C77BB] Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff1", "LB=jsessionid=", "RB=\"", "Ord=1", "IgnoreRedirections=Yes", "Search=Body", "RelFrameId=1", LAST );
.......
web_concurrent_end(NULL);
......
web_custom_request("register.faces;jsessionid={WCSParam_Diff1}",
"URL=http://192.168.1.44:8080/ChildSys/register/register.faces;jsessionid={OracleAppJSESSIONID3}",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://192.168.1.44:8080/ChildSys/register/register.faces",
"Snapshot=t21.inf",
"Mode=HTTP",
"Body=regeditForm=regeditForm®editForm%3Aj_idt11=®editForm%3Aname=®editForm%3Asex=0®editForm%3Abirthday=®editForm%3Anationality=%E8%AF%B7%E9%80%89%E6%8B%A9®editForm%3Aclasss=0®editForm%3Aaddress=®editForm%3AmobilePhone=®editForm%3Afrom=®editForm%3Aorigin=®editForm%3Ahealth=%E8%AF%B7%E9%80%89%E6%8B%A9®editForm%3Aallergy=®editForm%3Adisease=®editForm%3Ainterest=®editForm%3Aorderlies=®editForm%3Areason=®editForm%3Aother=®editForm%3Aj_idt54="
"%E5%A7%93%E5%90%8D®editForm%3Aj_idt55=%E5%B9%B4%E9%BE%84®editForm%3Aj_idt56=%E5%85%B3%E7%B3%BB®editForm%3Aj_idt57=%E5%B7%A5%E4%BD%9C%E5%8D%95%E4%BD%8D®editForm%3Aj_idt58=%E5%AD%A6%E5%8E%86®editForm%3Aj_idt59=%E8%81%8C%E7%A7%B0®editForm%3Aj_idt60=%E8%81%94%E7%B3%BB%E7%94%B5%E8%AF%9D®editForm%3Aj_idt62=®editForm%3Aage=®editForm%3Aj_idt63=®editForm%3Aj_idt64=®editForm%3Aj_idt65=®editForm%3Aj_idt66=®editForm%3Aphonec=&javax.faces.ViewState="
"{Siebel_Analytic_ViewState2_URL}&javax.faces.source=regeditForm%3Aokid&javax.faces.partial.execute=regeditForm%3Aokid%20regeditForm%3Aokid&javax.faces.partial.render=regeditForm%3Aclasss&javax.faces.behavior.event=action&javax.faces.partial.ajax=true",
LAST);
web_convert_param("Siebel_Analytic_ViewState2_URL",
"SourceString={Siebel_Analytic_ViewState2}",
"SourceEncoding=HTML",
"TargetEncoding=URL",
LAST);
。。。。。。
return 0;
}
[
本帖最后由 mikyviky 于 2010-5-13 16:04 编辑
]
作者:
skyzhu
时间:
2010-5-13 16:16
404 不是 not found 吗?
把jsessionid写在URL上干什么?
session一般不需要关联,产生后再下一次的请求中会自动带上,除非有特别的用处
如果要关联或者修改session,也是在请求的header中修改
web_add_header
作者:
mikyviky
时间:
2010-5-13 16:32
每次回放脚本 报错 [attach]62012[/attach] 应该怎么解决呢?
作者:
mikyviky
时间:
2010-5-13 16:55
新手求赐教呢 急啊
作者:
ziheng198688
时间:
2010-5-13 17:05
楼主可以手动尝试输入出错的URL,如果出现同样的问题,可能是sessionid没有取得正确的值。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2