51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1765|回复: 1
打印 上一主题 下一主题

[原创] loadrunner录制的脚本无法执行问题--还请诸位高手多帮忙

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-6-18 08:43:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
最近作公司项目性能测试,分析部分功能的两种实现方式那种好,但是录好的脚本在执行的时候总是提示错误下面是录制的脚本,和错误提示信息,还请大家多帮忙。谢啦。
脚本:
#include "web_api.h"


Action()
{
        web_url("eimtest",
                "URL=http://172.20.19.134:8080/eimtest",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/eimtest/images/index/index_08.gif", "Referer=http://172.20.19.134:8080/eimtest/", ENDITEM,
                LAST);

        lr_think_time( 22 );

        web_submit_form("loginAction.do",
                "Snapshot=t2.inf",
                ITEMDATA,
                "Name=subCompanyId", "Value=重庆市电力公司", ENDITEM,
                "Name=userName", "Value=csm", ENDITEM,
                "Name=password", "Value=cqepcsm", ENDITEM,
                LAST);
        lr_think_time( 22 );
        web_url("MarqContAction.do",                "URL=http://172.20.19.134:8080/eimtest/news/MarqContAction.do",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gnbj/left_02.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/gnbj/left_03.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/gnbj/left_04.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/gnbj/gnbj_02.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/gnbj/gnbj_05.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top2_21.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top2/top2_37.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top2/top2_40.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top/top_37.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top/top_40.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top2/top2_43.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top/top_43.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top/top_34.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top/top_31.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top2/top2_28.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                "Url=../images/top/top_28.gif", "Referer=http://172.20.19.134:8080/eimtest/mainpage.jsp", ENDITEM,
                LAST);

        lr_think_time( 1 );

        web_image("top_37.gif",
                "Src=images/top/top_37.gif",
                "Snapshot=t4.inf",
                EXTRARES,
                "Url=images/index/index_08.gif", ENDITEM,
                LAST);

        return 0;
}

从红字开始出现的错误,往下就没有执行过去。

下面是错误信息:
Action.c(27): Error -26627: HTTP Status-Code=404 (/eimtest/topic/a.html) for "http://172.20.19.134:8080/eimtest/topic/a.html"          [MsgId: MERR-26627]
Action.c(27): Error -26627: HTTP Status-Code=404 (/eimtest/topic/a.html) for "http://172.20.19.134:8080/eimtest/topic/a.html"          [MsgId: MERR-26627]
Action.c(27): Error -26627: HTTP Status-Code=404 (/eimtest/topic/a.html) for "http://172.20.19.134:8080/eimtest/topic/a.html"          [MsgId: MERR-26627]
Action.c(27): Error -26627: HTTP Status-Code=404 (/eimtest/topic/a.html) for "http://172.20.19.134:8080/eimtest/topic/a.html"          [MsgId: MERR-26627]
Action.c(27): web_url("MarqContAction.do") highest severity level was "ERROR", 342445 body bytes, 18925 header bytes, 66 chunking overhead bytes          [MsgId: MMSG-26387]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.

小弟初学乍到,还请多帮忙
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2008-6-18 10:21:11 | 只看该作者
应该是登录后的http://172.20.19.134:8080/eimtest/topic/a.html这个内容是动态的,导致lr重新运行找不到这个页面,这需要用关联去实现

你可以先录制到登录把红字后面的脚本都注视,然后运行脚本,看看报告中的显示有什么不一样,再用关联函数去处理
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-10-3 03:29 , Processed in 0.084082 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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