51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[求助] 回放时成功,但controller中运行时出错

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2013-1-24 18:26:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
脚本如下:
Action()
{
        web_submit_data("login",
                "Action= http://IPORT/Mobile/login",
                "Method=POST",
                ITEMDATA,
                "Name=appcode","Value=10021",ENDITEM,
                "Name=reqstr","Value={reqstr}",ENDITEM,
                "Name=verify","Value={verify}",ENDITEM,
                "Name=datatype","Value=j",ENDITEM,
                LAST);

        return 0;
}
回放时是成功的,但是在controller中运行的时候就提示:Warning: The string 'verify' with parameter delimiters is not a parameter.  
verify参数没有取到值,具体的日志如下:

Virtual User Script started        [MsgId: MMSG-15967]
Starting action vuser_init.        [MsgId: MMSG-15919]
Web Turbo Replay of LoadRunner 9.50 for WINXP; WebReplay9a build 6220 (Dec 28 2008 17:01:56)          [MsgId: MMSG-27143]
Run Mode: HTML          [MsgId: MMSG-26000]
Run-Time Settings file: "C:\Documents and Settings\Administrator\Local Settings\Temp\lr5tmpdir5FX.870\lrcfgSI3.871\cfgMc6.885"          [MsgId: MMSG-27141]
Ending action vuser_init.        [MsgId: MMSG-15918]
Running Vuser...        [MsgId: MMSG-15964]
Starting iteration 1.        [MsgId: MMSG-15968]
Starting action Action.        [MsgId: MMSG-15919]
Action.c(4): Notify: Parameter Substitution: parameter "reqstr" =  "dXNlcj15YW5ncEBuZXQtZWFzdC5jb20mcGFzc3dvcmQ9ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U="        [MsgId: MMSG-13992]
Action.c(4): Warning: The string 'verify' with parameter delimiters is not a parameter.        [MsgId: MWAR-13987]
Action.c(4): t=246ms: 470-byte response headers for "http://IPORT/Mobile/login" (RelFrameId=1, Internal ID=1)
Action.c(4):     HTTP/1.1 200 OK\r\n
Action.c(4):     Date: Thu, 24 Jan 2013 10:17:32 GMT\r\n
Action.c(4):     Server: Apache/2.2.15 (CentOS)\r\n
Action.c(4):     X-Powered-By: PHP/5.3.3\r\n
Action.c(4):     Set-Cookie: PHPSESSID=67ve57hiope3mv76k0bpoue004; path=/\r\n
Action.c(4):     Expires: Thu, 19 Nov 1981 08:52:00 GMT\r\n
Action.c(4):     Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n
Action.c(4):     Pragma: no-cache\r\n
Action.c(4):     Set-Cookie: think_template=default; expires=Thu, 17-Feb-2056 21:35:04 GMT; path=/\r\n
Action.c(4):     Content-Length: 48\r\n
Action.c(4):     Connection: close\r\n
Action.c(4):     Content-Type: text/html; charset=UTF-8\r\n
Action.c(4):     \r\n
Action.c(4): t=247ms: 48-byte response body for "http://IPORT/Mobile/login" (RelFrameId=1, Internal ID=1)
Action.c(4):     {"code":"103","description":"verify is invalid"}
Action.c(4): web_submit_data("login") was successful, 48 body bytes, 470 header bytes          [MsgId: MMSG-26386]
Ending action Action.        [MsgId: MMSG-15918]
Ending iteration 1.        [MsgId: MMSG-15965]
Ending Vuser...        [MsgId: MMSG-15966]
Starting action vuser_end.        [MsgId: MMSG-15919]
Ending action vuser_end.        [MsgId: MMSG-15918]
Vuser Terminated.        [MsgId: MMSG-15963]
Vuser 0 (thread 4504), ended OK."        [MsgId: MMSG-10695]

请问这是什么原因呢?Run-time settings在回放和controller中设置是一致的。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2013-1-25 10:50:21 | 只看该作者
请问没人遇到过这种问题吗?
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2013-1-27 10:26:09 | 只看该作者
在设置里有个参数的边界符号你设的是{么
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2013-1-28 14:20:15 | 只看该作者
多数情况是:1 如果参数化里的设置出错,取不到值就会报这个错
                  2 关联的数据没有找到,左右边界问题

回放脚本的时候仔细看下Replay log
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-4 14:26 , Processed in 0.075126 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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