51Testing软件测试论坛
标题:
朋友们进来帮个忙,急急!!
[打印本页]
作者:
pingglv5858
时间:
2006-11-30 16:03
标题:
朋友们进来帮个忙,急急!!
我录制了一个Agentflow这个平台的脚本,参数化后,迭代运行3次,可是每次运行,都是第一次迭代运行了下面这个函数
web_custom_request("CalEditor.jar",
"URL=http://localhost:8080/WebAgenda/eform/class/plugin/CalEditor.jar",
"Method=HEAD",
"TargetFrame=",
"Resource=1",
"RecContentType=application/java-archive",
"Referer=",
LAST);
其余2次都没有运行,所以在数据库中的数据就有问题.请问各位,是要关联这个函数吗?如果是,又该怎样关联这个函数?急急!!
还有一个问题:
就是录制的过程中,通过java产生一个表单,然后我提交表单,就会弹出一个对话框,说该表单已提交到某某人,但是,发现脚本中根本就没有把这个过程录下来,即提示提交到某人这一过程没有录下来,请问是什么原因?我用的是html模式录的.
作者:
pingglv5858
时间:
2006-11-30 17:00
好的,我试试
作者:
pingglv5858
时间:
2006-12-1 10:56
試了下手動關聯,不是關聯的問題,不知道哪位還知不知道是什麼原因?
作者:
pingglv5858
时间:
2006-12-1 10:59
不同的是"Snapshot=t9.inf", 這個需要關聯嗎?
按照手動關聯去做,在執行日志中找不到這個。而且執行的時候這裡老是出問題,無法執行,停留很久。
作者:
pingglv5858
时间:
2006-12-1 13:46
怎麼沒人回下哦sdlkfj9
作者:
AlanStone
时间:
2006-12-3 11:10
不象是关联的问题.把出错的内容贴上来看看.
作者:
pingglv5858
时间:
2006-12-4 08:55
没有提示错误信息,但在运行的时候,数据库中的数据不对,因为每次运行时,第一次运行了web_custom_request函数,其它的都没有运行该函数,因此,数据库中插入的数据少了,下面是脚本代码:
Action()
{
web_set_max_html_param_len("1024");
web_url("_md5",
"URL=http://download.china.alibaba.com/search/yitianwb/2/_md5",
"TargetFrame=",
"Resource=1",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t1.inf",
LAST);
/* Registering parameter(s) from source task id 18
// {JSESSIONID2} = "CEC664228AF57DDD5E1CC315568A2332"
// */
web_reg_save_param("JSESSIONID2",
"LB/IC=jsessionid=",
"RB/IC=\"",
"Ord=3",
"RelFrameId=1",
"Search=body",
LAST);
// [WCSPARAM WCSParam_Diff1 32 CEC664228AF57DDD5E1CC315568A2332] Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param("WCSParam_Diff1",
"LB=jsessionid=",
"RB=\"",
"Ord=3",
"Search=Body",
"RelFrameId=1",
LAST);
web_url("WebAgenda",
"URL=http://localhost:8080/WebAgenda",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"URL=/WebAgenda/skins/default/image/aepp/login/bg.gif", "Referer=http://localhost:8080/WebAgenda/", ENDITEM,
LAST);
web_reg_find("Text=Agentflow Enterprise Process Portal",
LAST);
web_reg_find("Text=Announcement",
LAST);
web_submit_data("login.do;jsessionid={WCSParam_Diff1}",
"Action=http://localhost:8080/WebAgenda/login.do;jsessionid={JSESSIONID2}",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://localhost:8080/WebAgenda/",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=loginName", "Value={NewParam}", ENDITEM,
"Name=password", "Value={NewParam_1}", ENDITEM,
EXTRARES,
"URL=skins/default/image/aepp/submenu_bg.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=skins/default/image/aepp/tab_selected_middle.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=skins/default/image/aepp/tab_normal_middle.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=portal/decorators/aepp_default_1/2.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=skins/default/image/list_title_bg.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=skins/default/image/aepp/list/list_title_bg.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=skins/default/image/aepp/list/list_title_separate.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=portal/decorators/aepp_default_1/8.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=skins/default/image/aepp/portlet/member_middle.gif", "Referer=http://localhost:8080/WebAgenda/index.do", ENDITEM,
"URL=portal/image/note_3.gif", "Referer=http://localhost:8080/WebAgenda/portal/bbs/bbsgloballist.jsp", ENDITEM,
LAST);
web_reg_find("Text=Agentflow Enterprise Process Portal",
LAST);
web_url("流程作业",
"URL=http://localhost:8080/WebAgenda/MyTask.do",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:8080/WebAgenda/index.do",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"URL=skins/default/image/aepp/process_1/field_title_hover_bg.gif", ENDITEM,
"URL=skins/default/image/aepp/process_1/workzone_bg.jpg", ENDITEM,
"URL=image/top/login_1.gif", ENDITEM,
LAST);
web_reg_find("Text=Agentflow Enterprise Process Portal",
LAST);
web_url("启动流程\xA0",
"URL=http://localhost:8080/WebAgenda/ProjectList.do",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:8080/WebAgenda/MyTask.do",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"URL=image/border/form/title_bg.gif", "Referer=http://localhost:8080/WebAgenda/ProjectList.do", ENDITEM,
LAST);
web_reg_find("Text=Agentflow Enterprise Process Portal",
LAST);
// [WCSPARAM WCSParam_Diff2 20 ROL00521143462205296] Parameter {WCSParam_Diff2} created by Correlation Studio
web_reg_save_param("WCSParam_Diff2",
"LB=roleID=",
"RB=&",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_url("ProjectList.do",
"URL=http://localhost:8080/WebAgenda/ProjectList.do?scrollTop=0&node=PRJ00001152578595342",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=Agentflow Enterprise Process Portal",
LAST);
web_url("Keyword.do;jsessionid={WCSParam_Diff1}",
"URL=http://localhost:8080/WebAgenda/Keyword.do;jsessionid={WCSParam_Diff1}?roleID={WCSParam_Diff2}&processID=PRO00001152578645421",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=Agentflow Enterprise Process Portal",
LAST);
lr_rendezvous("apply");
lr_start_transaction("apply");
web_submit_data("createProcess.do",
"Action=http://localhost:8080/WebAgenda/createProcess.do",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://localhost:8080/WebAgenda/Keyword.do;jsessionid={WCSParam_Diff1}?roleID={WCSParam_Diff2}&processID=PRO00001152578645421",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=roleID", "Value={WCSParam_Diff2}", ENDITEM,
"Name=keyword", "Value=", ENDITEM,
"Name=priority", "Value=2", ENDITEM,
"Name=processID", "Value=PRO00001152578645421", ENDITEM,
"Name=processName", "Value=料号及属性异动申请系统(TW_V1.2)", ENDITEM,
"Name=roleID", "Value={WCSParam_Diff2}", ENDITEM,
EXTRARES,
"URL=eform/class/plugin/MyGrid.jar", ENDITEM,
"URL=eform/class/lib/iText039.jar", ENDITEM,
"URL=eform/class/lib/iTextAsian.jar", ENDITEM,
"URL=eform/class/lib/xmlsec.jar", ENDITEM,
"URL=eform/class/plugin/ArtifactSource.jar", ENDITEM,
"URL=eform/class/plugin/ArtTranslate.jar", ENDITEM,
"URL=eform/class/plugin/AttachedFile.jar", ENDITEM,
"URL=eform/class/plugin/BarCode.jar", ENDITEM,
"URL=eform/class/plugin/CalEditor.jar", ENDITEM,
"URL=eform/class/plugin/DbComboBox.jar", ENDITEM,
"URL=eform/class/plugin/DbNavigator.jar", ENDITEM,
"URL=eform/class/plugin/plugin.jar", ENDITEM,
"URL=eform/class/plugin/DbSource.jar", ENDITEM,
"URL=eform/class/plugin/DbTable.jar", ENDITEM,
"URL=eform/class/plugin/DbTextArea.jar", ENDITEM,
"URL=eform/class/plugin/DbTextField.jar", ENDITEM,
"URL=eform/class/plugin/ESignature.jar", ENDITEM,
"URL=eform/class/lib/log4j.jar", ENDITEM,
"URL=eform/class/lib/Sprinta2000.jar", ENDITEM,
"URL=eform/class/lib/oracle.jar", ENDITEM,
"URL=eform/class/lib/js.jar", ENDITEM,
"URL=eform/class/lib/myjs.jar", ENDITEM,
"URL=eform/class/lib/rmicb_1_2_1.jar", ENDITEM,
"URL=eform/class/lib/plugin.jar", ENDITEM,
"URL=eform/class/lib/parser.jar", ENDITEM,
"URL=eform/class/webform.jar", ENDITEM,
"URL=eform/class/lib/jakarta-oro-2.0.8.jar", ENDITEM,
"URL=eform/class/lib/agreport.jar", ENDITEM,
"URL=eform/class/lib/mm_mysql_2_0_2_bin.jar", ENDITEM,
"URL=eform/class/lib/tv3API.jar", ENDITEM,
"URL=eform/class/lib/xercesImpl.jar", ENDITEM,
"URL=eform/class/lib/xmlParserAPIs.jar", ENDITEM,
LAST);
web_custom_request("CalEditor.jar",
"URL=http://localhost:8080/WebAgenda/eform/class/plugin/CalEditor.jar",
"Method=POST",
"TargetFrame=",
"Resource=1",
"RecContentType=application/java-archive",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTML",
"Body=",
LAST);
lr_end_transaction("apply", LR_AUTO);
lr_think_time(23);
web_url("CheckSessionTimeout.do;jsessionid={WCSParam_Diff1}",
"URL=http://localhost:8080/WebAgenda/CheckSessionTimeout.do;jsessionid={WCSParam_Diff1}?from=completeTask&formStyle=APPLET&taskID=undefined",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:8080/WebAgenda/createProcess.do",
"Snapshot=t10.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=Agentflow Enterprise Process Portal",
LAST);
lr_think_time(6);
web_url("MyTask.do;jsessionid={WCSParam_Diff1}",
"URL=http://localhost:8080/WebAgenda/MyTask.do;jsessionid={JSESSIONID2}",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t11.inf",
"Mode=HTML",
LAST);
web_url("logout.gif",
"URL=http://localhost:8080/WebAgenda/logout.do",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:8080/WebAgenda/MyTask.do;jsessionid={JSESSIONID2}",
"Snapshot=t12.inf",
"Mode=HTML",
LAST);
lr_output_message("--%s--", lr_eval_string("{NewParam}"));
lr_output_message("--%s--", lr_eval_string("{NewParam_1}"));
return 0;
}
作者:
AlanStone
时间:
2006-12-4 09:33
问题不是在 web_custom_request("CalEditor.jar", 这里.
应该是在web_submit_data("createProcess.do",这里有好多参数化要做.从流程上看,做到这一步就应该已经向数据加了数据.
也许你应该好好研究一下web_submit_data("createProcess.do 中的相关参数.
作者:
pingglv5858
时间:
2006-12-4 12:34
恩,謝謝指點!
我再看下
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2