51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 4337|回复: 3
打印 上一主题 下一主题

[原创] 新手遇到问题,请高手指导

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-10-26 19:21:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
录制的脚本中,是一个新增操作
把脚本中新增的名称参数化

新增脚本为
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.]


附件是脚本
请各位高手指导是怎么回事,是参数设置得有问题吗

本帖子中包含更多资源

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

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

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2009-10-27 15:35:34 | 只看该作者
都没有人帮忙指导下吗。。
回复 支持 反对

使用道具 举报

  • TA的每日心情
    奋斗
    2022-5-8 19:23
  • 签到天数: 137 天

    连续签到: 1 天

    [LV.7]测试师长

    3#
    发表于 2009-10-29 09:43:46 | 只看该作者
    参数化可能不正确吧,建议你录制两次脚本,以同样的操作

    然后对比脚本,看看哪些地方需要参数化
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
    发表于 2012-1-9 23:57:58 | 只看该作者
    参数化设置
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-24 04:03 , Processed in 0.110613 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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