51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2847|回复: 2
打印 上一主题 下一主题

[原创] 脚本录制成功,编辑通过,但单机运行是出错了,怎么回事啊

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-4-13 14:48:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
sdlkfj9 sdlkfj9 sdlkfj9 sdlkfj9
脚本代码如下:
#include "web_api.h"


Action()
{
        web_set_max_html_param_len("1024");

        /* Registering parameter(s) from source task id 5
        // {CSRule_1_UID4} = "11764441269719256"
        // */
        web_reg_save_param("CSRule_1_UID4",
                "LB= value=\"",
                "RB=\"",
                "Ord=1",
                "Search=Body",
                "RelFrameId=1",
                LAST);

        /* Registering parameter(s) from source task id 5
        // {CSRule_1_UID5} = "LT-29-oQvYuROFulSI1smhXcJR"
        // */
        web_reg_save_param("CSRule_1_UID5",
                "LB= value=\"",
                "RB=\"",
                "Ord=2",
                "Search=Body",
                "RelFrameId=1",
                LAST);

        web_url("scm",
                "URL=http://192.168.1.9:8080/scm",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

        lr_think_time( 28 );

        lr_rendezvous("loggingin");/*
                                * start logging in
                                */

        lr_think_time( 3 );

        lr_start_transaction("logging in");

        lr_think_time( 15 );

        lr_think_time( 89 );

        web_submit_data("login",
                "Action=https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=fileName", "Value={CSRule_1_UID4}", ENDITEM,
                "Name=lt", "Value={CSRule_1_UID5}", ENDITEM,
                "Name=username", "Value=xsjl$#*@$it01", ENDITEM,
                "Name=companyCode", "Value={NewParam1}", ENDITEM,
                "Name=uname", "Value={NewParam2}", ENDITEM,
                "Name=password", "Value={NewParam3}", ENDITEM,
                "Name=validateCode", "Value=16888", ENDITEM,
                LAST);

        web_url("scm_2",
                "URL=http://192.168.1.9:8080/scm/?ticket=ST-28-bEMUPQfiH6ThlqgwHxwF",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                LAST);

        web_url("authentication.action",
                "URL=http://192.168.1.9:8080/scm/authentication.action",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t4.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=web/DstreeSharedDir/DSTree.htc", "Referer=", ENDITEM,
                "Url=web/images/main/ding1.jpg", ENDITEM,
                "Url=web/images/main/tu.jpg", ENDITEM,
                "Url=web/images/main/ding4.jpg", ENDITEM,
                "Url=web/images/main/xiayou.jpg", ENDITEM,
                "Url=web/images/main/xiazuo.jpg", ENDITEM,
                "Url=web/DstreeSharedDir/DSTree.xsl", ENDITEM,
                "Url=web/DstreeSharedDir/contract.gif", ENDITEM,
                "Url=web/DstreeSharedDir/open.gif", ENDITEM,
                "Url=web/DstreeSharedDir/leaf.gif", ENDITEM,
                "Url=web/DstreeSharedDir/page.gif", ENDITEM,
                "Url=web/DstreeSharedDir/expand.gif", ENDITEM,
                "Url=web/DstreeSharedDir/close.gif", ENDITEM,
                LAST);

        lr_think_time( 461 );

        lr_end_transaction("logging in", LR_AUTO);

        return 0;
运行结果代码如下
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.0.0 for WINXP; Web build 4141          [MsgId: MMSG-27143]
Run-Time Settings file: "C:\Documents and Settings\快乐工作\Local Settings\Temp\noname55\\default.cfg"          [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(6): web_set_max_html_param_len was successful          [MsgId: MMSG-26392]
Action.c(11): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(22): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(30): Redirecting "http://192.168.1.9:8080/scm" (redirection depth=0)          [MsgId: MMSG-26694]
Action.c(30): To location "http://192.168.1.9:8080/scm/"          [MsgId: MMSG-26693]
Action.c(30): Redirecting "http://192.168.1.9:8080/scm/" (redirection depth=1)          [MsgId: MMSG-26694]
Action.c(30): To location "https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F"          [MsgId: MMSG-26693]
Action.c(30): Found resource "https://www.seekcall.com:8443/cas/web/pagesStyleSheet.css" in HTML "https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F"          [MsgId: MMSG-26659]
Action.c(30): Found resource "https://www.seekcall.com:8443/cas/web/public.js" in HTML "https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F"          [MsgId: MMSG-26659]
Action.c(30): Found resource "https://www.seekcall.com:8443/cas/web/images/loginBg.gif" in HTML "https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F"          [MsgId: MMSG-26659]
Action.c(30): Found resource "https://www.seekcall.com:8443/cas/web/images/loginWindow.jpg" in HTML "https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F"          [MsgId: MMSG-26659]
Action.c(30): Found resource "https://www.seekcall.com:8443/cas/web/picbuild/11764466542565161.jpg" in HTML "https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.9%3A8080%2Fscm%2F"          [MsgId: MMSG-26659]
Action.c(30): web_url("scm") was successful, 56229 body bytes, 1733 header bytes, 5 chunking overhead bytes          [MsgId: MMSG-26385]
Action.c(41): Rendezvous loggingin
Action.c(47): Notify: Transaction "logging in" started.
Action.c(53): web_submit_data("login") was successful, 437 body bytes, 263 header bytes          [MsgId: MMSG-26386]
Action.c(70): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://192.168.1.9:8080/scm/?ticket=ST-28-bEMUPQfiH6ThlqgwHxwF"          [MsgId: MERR-26612]
Action.c(70): web_url("scm_2") highest severity level was "ERROR", 1434 body bytes, 182 header bytes          [MsgId: MMSG-26388]
Action.c(70): Notify: Transaction "logging in" ended with "Fail" status (Duration: 0.7436 Wasted Time: 0.0000).
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
图如下

本帖子中包含更多资源

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

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

使用道具 举报

该用户从未签到

2#
发表于 2007-4-13 15:40:56 | 只看该作者
在70行找不到这个地址——http://192.168.1.9:8080/scm/?ticket=ST-28-bEMUPQfiH6ThlqgwHxwF,服务器出错。
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2007-4-13 15:54:51 | 只看该作者
哦         sdlkfj9
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-27 14:34 , Processed in 0.073679 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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