51Testing软件测试论坛

标题: LR运行错误 [打印本页]

作者: wjjiao    时间: 2010-6-13 14:35
标题: LR运行错误
我用下面一段代码运行后提示我下面的错误,有点搞不懂那个错误是什么意思啊,麻烦各位高手帮忙看看
        #include "web_api.h"


Action()
{   

         web_url("index.htm",
        "URL=http://192.168.3.144:8099/h/xlstk/{SHA}/{PAGE}",       
            "Resource=1",
            "RecContentType=text/html",
            "Referer=0",
            "Snapshot=t1.inf",
            "Mode=HTML",
        lr_output_message("SHA is %s,PAGE is %s",lr_eval_string("{SHA}"),lr_eval_string ("{PAGE}")),
            LAST
                       
    );
        return 0;
}

虚拟用户脚本已启动
正在开始操作 vuser_init。
Web Turbo 重播 LoadRunner 8.1.0 for WINXP; Web 内部版本 4788          [MsgId: MMSG-27143]
运行时设置文件: "C:\Documents and Settings\Administrator\Local Settings\Temp\noname1\\default.cfg"          [MsgId: MMSG-27141]
正在结束操作 vuser_init。
正在运行 Vuser...
正在开始迭代 1。
正在开始操作 Action。
Action.c(8): SHA is sh600000,PAGE is cw_cwjb.htm
Action.c(8): 错误: C interpreter run time error: Action.c (8):  Error -- memory violation : Exception ACCESS_VIOLATION received.
Action.c(8): 通知: CCI 跟踪: Action.c(8): web_url(0x0101020b "index.htm", 0x010101d8 "URL=http://192.168.3.144:8099/h/xlstk/{S...", 0x010101cd "Resource=1", 0x010101b4 "RecContentType=text/html", 0x010101aa "Referer=0", 0x0101019a "Snapshot=t1.inf", 0x01010190 "Mode=HTML", 35, 0x01010169.
Action.c(8): 通知: CCI 跟踪:  "LAST")
.
Action.c(8): 通知: CCI 跟踪: Compiled_code(0): Action()
.
正在结束 Vuser...
正在开始操作 vuser_end。
正在结束操作 vuser_end。
Vuser 已终止。
作者: wjjiao    时间: 2010-6-13 14:48
嘿嘿 知道怎么错了
我把output函数写错位置了啊 写成这样就好了
        #include "web_api.h"


Action()
{   
        web_url("index.htm",
                    "URL=http://192.168.3.144:8099/h/xlstk/{SHA}/{PAGE}",       
            "Resource=1",
            "RecContentType=text/html",
            "Referer=0",
            "Snapshot=t1.inf",
            "Mode=HTML",               
            LAST       
    );
     lr_output_message("SHA is %s,PAGE is %s",lr_eval_string("{SHA}"),lr_eval_string ("{PAGE}"));
    return 0;
}
作者: wjjiao    时间: 2010-6-13 15:03
标题: LR场景控制器运行过程调用了哪些参数哪里可以看见
问个问题哦,就是假设我在使用lr场景控制器运行,vuser设置为60个,其中脚本中有参数,设置为随机运行,哪里可以看见我运行过程中都调用了哪些参数?
作者: ganlan    时间: 2010-8-16 09:31
这个运行结果中好像是没的看的了。
要写个输出函数,讲参数打到日志中去,然后再找日志文件来看。




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