51Testing软件测试论坛

标题: 我刚学loadrunner还不大懂大家进来看这是怎么搞的啊? [打印本页]

作者: ags1234    时间: 2006-9-20 16:36
标题: 我刚学loadrunner还不大懂大家进来看这是怎么搞的啊?
我用loadrunner做了个网页登入脚本,在做好后我运行了几次都没问题,但当我关了LR在开时我再运行这个脚本就会出错啊?
我的脚本运行完能在BBS上看到我的ID登入成功,但是我关了LR在开时运行就开不到这个ID上线了,但是LR也没报错啊!这是为啥啊?
作者: ags1234    时间: 2006-9-20 17:01
标题: 进来帮帮忙吧?
进来帮帮忙吧?谢谢拉!
作者: wtucel    时间: 2006-9-27 15:43
用户登陆带验证码吧??
作者: 枫飞林    时间: 2006-9-28 14:41
我得也是啊!真是怪怪得问题啊!我录制得脚本昨天还好好得,今天用得时候就是登陆验证不通过,真是郁闷啊
作者: dandan    时间: 2006-9-28 15:38
重新录制对比一下原来录制的,是不是ID已经变了。。。。。
如果ID变了的话就要进行动态连接
作者: jut984907    时间: 2006-9-28 16:25
把出错的信息具体拿出来,大家才好出主意的
作者: 论坛守护神    时间: 2006-9-28 16:55
报的啥子错哦
作者: 枫飞林    时间: 2006-9-29 16:15
web_url("welcome.do",
                "URL=http://192.168.0.32:7011/bms/welcome.do?_nstc_webgate_sid_=FYBkglLk1nx18Vab75ov7WzLnrmMlbZWzqij75rew4wzNteKqNAP!-350737499!1159250212515",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.32:7011/webgate/login.do",
                "Snapshot=t4.inf",
                "Mode=HTML",
在这里过不去,Action.c(37): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://192.168.0.32:7011/bms/welcome.do?_nstc_webgate
作者: 枫飞林    时间: 2006-9-29 16:34
标题: 脚本
#include "web_api.h"
#include "lrw_custom_body.h"


vuser_init()
{
        web_url("index.jsp",
                "URL=http://192.168.0.32:7007/webgate/index.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                LAST);

        web_url("main.do",
                "URL=http://192.168.0.32:7007/webgate/main.do",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t4.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=img/login-1.gif", ENDITEM,
                "Url=img/login-2.gif", ENDITEM,
                LAST);



        web_submit_form("login.do",
                "Snapshot=t5.inf",
                ITEMDATA,
                "Name=userno", "Value=0203057", ENDITEM,
                "Name=password", "Value=00000000", ENDITEM,
                EXTRARES,
                "Url=img/topbarbg.gif", "Referer=http://192.168.0.32:7007/webgate/header.do", ENDITEM,
                "Url=../gcredit/$notify.do?_nstc_webgate_sid_=FbxVqRWgUIWIWdxfLvaRBN3LMVXpoPdcDne18KLkEWmG1H2AGwdm!-1523907938!1159410005890", "Referer=http://192.168.0.32:7007/webgate/menu.do", ENDITEM,
                "Url=../gdebt/$notify.do?_nstc_webgate_sid_=FbxVqRWgUIWIWdxfLvaRBN3LMVXpoPdcDne18KLkEWmG1H2AGwdm!-1523907938!1159410005890", "Referer=http://192.168.0.32:7007/webgate/menu.do", ENDITEM,
                "Url=img/button-5.gif", "Referer=http://192.168.0.32:7007/webgate/header.do", ENDITEM,
                "Url=img/menubarbg.gif", "Referer=http://192.168.0.32:7007/webgate/menu.do", ENDITEM,
                LAST);

        web_url("welcome.do",
                "URL=http://192.168.0.32:7007/gdebt/welcome.do?_nstc_webgate_sid_=FbxVqRWgUIWIWdxfLvaRBN3LMVXpoPdcDne18KLkEWmG1H2AGwdm!-1523907938!1159410005890",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.32:7007/webgate/login.do",
                "Snapshot=t6.inf",
                "Mode=HTML",
                LAST);

        return 0;


Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.0.0 for WIN2000; Web build 4141          [MsgId: MMSG-27143]
Run-Time Settings file: "E:\load\rongzishangbao\\default.cfg"          [MsgId: MMSG-27141]
vuser_init.c(7): web_url("index.jsp") was successful, 726 body bytes, 287 header bytes          [MsgId: MMSG-26386]
vuser_init.c(16): Found resource "http://192.168.0.32:7007/webgate/include/main.css" in HTML "http://192.168.0.32:7007/webgate/main.do"          [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://192.168.0.32:7007/webgate/img/login-1.gif" in HTML "http://192.168.0.32:7007/webgate/main.do"          [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://192.168.0.32:7007/webgate/img/login-2.gif" in HTML "http://192.168.0.32:7007/webgate/main.do"          [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://192.168.0.32:7007/webgate/img/button-log.gif" in HTML "http://192.168.0.32:7007/webgate/main.do"          [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://192.168.0.32:7007/webgate/img/button-res.gif" in HTML "http://192.168.0.32:7007/webgate/main.do"          [MsgId: MMSG-26659]
vuser_init.c(16): web_url("main.do") was successful, 137352 body bytes, 1429 header bytes          [MsgId: MMSG-26386]
vuser_init.c(28): Think time - Waiting 3.00 seconds (according to limit).
vuser_init.c(28): lr_think_time: 3.00 seconds (recorded think time was 6.00 seconds).
vuser_init.c(30): Submitting form to "http://192.168.0.32:7007/webgate/login.do", Target Frame=""          [MsgId: MMSG-27978]
vuser_init.c(30): Detected non-resource "http://192.168.0.32:7007/webgate/header.do" in "http://192.168.0.32:7007/webgate/login.do"          [MsgId: MMSG-26574]
vuser_init.c(30): Detected non-resource "http://192.168.0.32:7007/webgate/menu.do" in "http://192.168.0.32:7007/webgate/login.do"          [MsgId: MMSG-26574]
vuser_init.c(30): Detected non-resource "http://192.168.0.32:7007/webgate/content.do" in "http://192.168.0.32:7007/webgate/login.do"          [MsgId: MMSG-26574]
vuser_init.c(30): Detected non-resource "http://192.168.0.32:7007/webgate/bottom.do" in "http://192.168.0.32:7007/webgate/login.do"          [MsgId: MMSG-26574]
vuser_init.c(30): Resource "http://192.168.0.32:7007/webgate/include/main.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/skins/winclassic.css" in HTML "http://192.168.0.32:7007/webgate/menu.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/js/poslib.js" in HTML "http://192.168.0.32:7007/webgate/menu.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/js/scrollbutton.js" in HTML "http://192.168.0.32:7007/webgate/menu.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/js/menu4.js" in HTML "http://192.168.0.32:7007/webgate/menu.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/menubarbg.gif" in HTML "http://192.168.0.32:7007/webgate/menu.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Downloading resource "http://192.168.0.32:7007/gcredit/$notify.do?_nstc_webgate_sid_=FbxVqRWgUIWIWdxfLvaRBN3LMVXpoPdcDne18KLkEWmG1H2AGwdm!-1523907938!1159410005890" (specified by argument number 14)          [MsgId: MMSG-26577]
vuser_init.c(30): Downloading resource "http://192.168.0.32:7007/gdebt/$notify.do?_nstc_webgate_sid_=FbxVqRWgUIWIWdxfLvaRBN3LMVXpoPdcDne18KLkEWmG1H2AGwdm!-1523907938!1159410005890" (specified by argument number 17)          [MsgId: MMSG-26577]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/tips.gif" in HTML "http://192.168.0.32:7007/webgate/menu.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/include/data01.css" in HTML "http://192.168.0.32:7007/webgate/content.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/bottombg.gif" in HTML "http://192.168.0.32:7007/webgate/bottom.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/qiehuan.gif" in HTML "http://192.168.0.32:7007/webgate/bottom.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Detected non-resource "http://192.168.0.32:7007/webgate/profile.jsp" in "http://192.168.0.32:7007/webgate/bottom.do"          [MsgId: MMSG-26574]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/skins/winclassic-3.css" in HTML "http://192.168.0.32:7007/webgate/header.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/topbarbg.gif" in HTML "http://192.168.0.32:7007/webgate/header.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/button-2.gif" in HTML "http://192.168.0.32:7007/webgate/header.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/button-3.gif" in HTML "http://192.168.0.32:7007/webgate/header.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/button-4.gif" in HTML "http://192.168.0.32:7007/webgate/header.do"          [MsgId: MMSG-26659]
vuser_init.c(30): Downloading resource "http://192.168.0.32:7007/webgate/img/button-5.gif" (specified by argument number 20)          [MsgId: MMSG-26577]
vuser_init.c(30): Found resource "http://192.168.0.32:7007/webgate/img/bg1.gif" in HTML "http://192.168.0.32:7007/webgate/profile.jsp"          [MsgId: MMSG-26659]
vuser_init.c(30): web_submit_form("login.do") was successful, 153081 body bytes, 5382 header bytes          [MsgId: MMSG-26386]
vuser_init.c(42): Think time - Waiting 3.00 seconds (according to limit).
vuser_init.c(42): lr_think_time: 3.00 seconds (recorded think time was 6.00 seconds).
vuser_init.c(43): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://192.168.0.32:7007/gdebt/welcome.do?_nstc_webgate_sid_=FbxVqRWgUIWIWdxfLvaRBN3LMVXpoPdcDne18KLkEWmG1H2AGwdm!-1523907938!1159410005890"          [MsgId: MERR-26612]
vuser_init.c(43): web_url("welcome.do") highest severity level was "ERROR", 1836 body bytes, 217 header bytes          [MsgId: MMSG-26388]
Abort was called from an action.
作者: jackloo    时间: 2006-9-30 13:41
http://192.168.0.32:7011/bms/wel ... 37499!1159250212515”其中的“FYBkglLk1nx18Vab75ov7WzLnrmMlbZWzqij75rew4wzNteKqNAP!-350737499!1159250212515”是session信息,你的session重新获取了,这部分信息当然就不一样了。
作者: 枫飞林    时间: 2006-9-30 13:55
在那么样才能避免这种错误啊!求助啊
作者: jackloo    时间: 2006-9-30 14:05
这样的论坛都是访问后会产生1个cockie文件的,这个session信息就包含在这个cockie里面,你要在脚本的“
      web_url("index.jsp",
                "URL=http://192.168.0.32:7007/webgate/index.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                LAST);
”之后就去读取这个cockie文件,获得这个参数,然后你就可以用它了。
作者: 枫飞林    时间: 2006-9-30 14:09
你有MSN吗或者QQ ,我还是不太明白啊!帮帮小弟了
作者: 枫飞林    时间: 2006-9-30 14:14
小弟的QQ69403600
MSN :hjf820804@hotmail.com




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