51Testing软件测试论坛

标题: 新手遇到问题,请高手指导 [打印本页]

作者: jassica    时间: 2009-10-26 19:21
标题: 新手遇到问题,请高手指导
录制的脚本中,是一个新增操作
把脚本中新增的名称参数化

新增脚本为
web_custom_request("GroupManageBO.saveGroupBasicInfoForAll.dwr",
  "URL=http://localhost:9080/TEST/dwr/call/plaincall/GroupManageBO.saveGroupBasicInfoForAll.dwr",
  "Method=POST",
  "Resource=0",
  "RecContentType=text/javascript",
  "Referer=http://localhost:9080/TEST/jsp/adm/cltm/addgroup.jsp",
  "Snapshot=t164.inf",
  "Mode=HTML",
  "EncType=text/plain",
  "Body=callCount=1\npage=/TEST/jsp/adm/cltm/addgroup.jsp\nhttpSessionId={session_id}\nscriptSessionId=14F3C0A81FA70B7EFE2BEDE3C5A9421C801\nc0-scriptName=GroupManageBO\nc0-methodName=saveGroupBasicInfoForAll\nc0-id=0\nc0-e1=string:super\nc0-e2=string:0\nc0-e3=number:0\nc0-e4=number:2\nc0-e5=string:test_jy_1022_1\nc0-e6=string:200906\nc0-e7=string:\nc0-e8=number:1\nc0-e9=null:null\nc0-e10=string:28\nc0-e11=number:1\nc0-e12=string:3\nc0-e13=string:164\nc0-param0=Object_Object:{creator"
  ":reference:c0-e1, user_local_code:reference:c0-e2, export_Stat:reference:c0-e3, group_Stat:reference:c0-e4, group_Name:reference:c0-e5, data_Period:reference:c0-e6, file_Name:reference:c0-e7, virtual_Table_Id:reference:c0-e8, precontract_time:reference:c0-e9, local_Id:reference:c0-e10, share_flag:reference:c0-e11, produce_Mode:reference:c0-e12, model_Id:{model_id}\nbatchId=1\n",
  LAST);

将红色字体部分参数化

运行脚本
服务器返回
Header:
------------------------------------------
HTTP/1.1 200 OK
Content-Type: text/javascript;charset=ISO-8859-1
Content-Language: zh-CN
Content-Length: 171
Date: Mon, 26 Oct 2009 10:31:51 GMT
Server: WebSphere Application Server/6.1

Body:
------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type c></HEAD>
<BODY><PRE>throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
dwr.engine._remoteHandleException('1','0',{javaClassName:"java.lang.Throwable",message:"Error"});
</PRE></BODY></HTML>


数据库中没有插入数据
到websphere下查看操作日志

发现新增时出错
错误日志为

[09-10-26 18:27:08:688 CST] 00000071 SystemOut     O 2009-10-26 18:27:08 WARN BaseCallMarshaller:67 - Marshalling exception
org.directwebremoting.extend.MarshallException: Error marshalling com.tydic.adm.po.GroupBasicInfoPO: Error reading bean. Input parameter probably is not an object. (Missing: {). See the logs for more details.
at org.directwebremoting.convert.BasicObjectConverter.convertInbound(BasicObjectConverter.java:70)
at org.directwebremoting.dwrp.DefaultConverterManager.convertInbound(DefaultConverterManager.java:159)
at org.directwebremoting.dwrp.BaseCallMarshaller.marshallInbound(BaseCallMarshaller.java:155)
at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:44)
at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.tydic.utils.servlet.EncodingFilter.doFilter(EncodingFilter.java:67)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
[09-10-26 18:27:08:688 CST] 00000071 SystemOut     O 2009-10-26 18:27:08 WARN BaseCallMarshaller:59 - --Erroring: batchId[1] message[org.directwebremoting.extend.MarshallException: Error marshalling com.tydic.adm.po.GroupBasicInfoPO: Error reading bean. Input parameter probably is not an object. (Missing: {). See the logs for more details.]


附件是脚本
请各位高手指导是怎么回事,是参数设置得有问题吗
作者: jassica    时间: 2009-10-27 15:35
都没有人帮忙指导下吗。。
作者: msnshow    时间: 2009-10-29 09:43
参数化可能不正确吧,建议你录制两次脚本,以同样的操作

然后对比脚本,看看哪些地方需要参数化
作者: maliya1314    时间: 2012-1-9 23:57
参数化设置




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2