51Testing软件测试论坛

标题: 急!!录制脚本时一直出现同样的错误!! [打印本页]

作者: haitun509    时间: 2008-7-4 11:43
标题: 急!!录制脚本时一直出现同样的错误!!
请各位高手帮忙分析下,为什么每次录制的时候都出现这样的错误,我录制完后,回放,提示错误代码是-26612。查看-26612错误原因:
Message Code 26612
HTTP Status-Code='%_1'_ld ('%2') for 'resource'

The replay sent an unsupported request to the server. The server responded with the error "INTERNAL SERVER ERROR".

Troubleshooting
Try to access the URL or the application being tested from a browser on the same machine.
Comment out or remove any preceding web_add_header and/or web_add_auto_header calls in the script.
Check for values in the script that might need correlation.

高手们,帮我分析下吧,偶都不知道为什么?
作者: iori    时间: 2008-7-4 13:08
贴上你的代码和回放日志
作者: haitun509    时间: 2008-7-4 14:24
action部分:
#include "lrs.h"
#include "as_web.h"


Action()
{
    web_url("left_linkbg.jpg",
                "URL=http://192.168.1.188:8090/mainsale/images/left_linkbg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.1.188:8090/mainsale/menu.do",
                "Snapshot=t3.inf",
                LAST);

    web_url("left_linkbg.jpg_2",
                "URL=http://192.168.1.188:8090/mainsale/images/left_linkbg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.1.188:8090/mainsale/menu.do",
                "Snapshot=t4.inf",
                LAST);

    web_url("left_linkbg.jpg_3",
                "URL=http://192.168.1.188:8090/mainsale/images/left_linkbg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.1.188:8090/mainsale/menu.do",
                "Snapshot=t5.inf",
                LAST);

    web_url("left_linkbg.jpg_4",
                "URL=http://192.168.1.188:8090/mainsale/images/left_linkbg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.1.188:8090/mainsale/menu.do",
                "Snapshot=t6.inf",
                LAST);

    web_url("newEmployeeAction.do",
                "URL=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.1.188:8090/mainsale/menu.do",
                "Snapshot=t7.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=images/left_linkbg.jpg", "Referer=http://192.168.1.188:8090/mainsale/menu.do", ENDITEM,
                LAST);

    web_custom_request("itemsBeans.findList",
                "URL=http://192.168.1.188:8090/mainsale/dwr/exec/itemsBeans.findList",
                "Method=POST",
                "Resource=1",
                "RecContentType=text/plain",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t8.inf",
                "EncType=",
                "Body=callCount=1\n"
                "c0-scriptName=itemsBeans\n"
                "c0-methodName=findList\n"
                "c0-id=9425_1215142076000\n"
                "c0-param0=string:select%20c.cityId%2Cc.cityName%20from%20City%20c\n"
                "c0-param1=string:\n"
                "xml=true\n",
                LAST);

    lr_think_time( 4 );

    web_submit_data("newEmployeeAction.do_2",
                "Action=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t9.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=command", "Value=query", ENDITEM,
                "Name=id", "Value=", ENDITEM,
                "Name=cityId", "Value=全部", ENDITEM,
                LAST);

    web_custom_request("itemsBeans.findList_2",
                "URL=http://192.168.1.188:8090/mainsale/dwr/exec/itemsBeans.findList",
                "Method=POST",
                "Resource=1",
                "RecContentType=text/plain",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t10.inf",
                "EncType=",
                "Body=callCount=1\n"
                "c0-scriptName=itemsBeans\n"
                "c0-methodName=findList\n"
                "c0-id=3649_1215142077875\n"
                "c0-param0=string:select%20c.cityId%2Cc.cityName%20from%20City%20c\n"
                "c0-param1=string:\n"
                "xml=true\n",
                LAST);

    lr_think_time( 1 );

    web_submit_data("newEmployeeAction.do_3",
                "Action=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t11.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=command", "Value=add", ENDITEM,
                "Name=id", "Value=", ENDITEM,
                "Name=cityId", "Value=全部", ENDITEM,
                "Name=infos", "Value=", ENDITEM,
                "Name=perPage", "Value=10", ENDITEM,
                "Name=pages", "Value=1", ENDITEM,
                LAST);

    web_custom_request("itemsBeans.findList_3",
                "URL=http://192.168.1.188:8090/mainsale/dwr/exec/itemsBeans.findList",
                "Method=POST",
                "Resource=1",
                "RecContentType=text/plain",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t12.inf",
                "EncType=",
                "Body=callCount=1\n"
                "c0-scriptName=itemsBeans\n"
                "c0-methodName=findList\n"
                "c0-id=8157_1215142082031\n"
                "c0-param0=string:select%20c.cityId%2Cc.cityName%20from%20City%20c\n"
                "c0-param1=string:\n"
                "xml=true\n",
                LAST);

    web_custom_request("itemsBeans.findList_4",
                "URL=http://192.168.1.188:8090/mainsale/dwr/exec/itemsBeans.findList",
                "Method=POST",
                "Resource=1",
                "RecContentType=text/plain",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t13.inf",
                "EncType=",
                "Body=callCount=1\n"
                "c0-scriptName=itemsBeans\n"
                "c0-methodName=findList\n"
                "c0-id=7516_1215142090875\n"
                "c0-param0=string:select%20c.countyId%2Cc.cityname%20from%20County%20c%20where%20c.cityId%3D\n"
                "c0-param1=string:591\n"
                "xml=true\n",
                LAST);

    web_custom_request("itemsBeans.findList_5",
                "URL=http://192.168.1.188:8090/mainsale/dwr/exec/itemsBeans.findList",
                "Method=POST",
                "Resource=1",
                "RecContentType=text/plain",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t14.inf",
                "EncType=",
                "Body=callCount=1\n"
                "c0-scriptName=itemsBeans\n"
                "c0-methodName=findList\n"
                "c0-id=6831_1215142092421\n"
                "c0-param0=string:select%20c.shopId%2Cc.shopName%20from%20ShopInfo%20c%20where%20c.status%3D1%20and%20c.deptid%3D'100'%20and%20c.cityId%3D\n"
                "c0-param1=string:5911\n"
                "xml=true\n",
                LAST);

    lr_think_time( 17 );

    web_submit_data("newEmployeeAction.do_4",
                "Action=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t15.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=command", "Value=save", ENDITEM,
                "Name=operatorName", "Value=小小", ENDITEM,
                "Name=cityId", "Value=591", ENDITEM,
                "Name=countyId", "Value=5911", ENDITEM,
                "Name=shopId", "Value=100591007", ENDITEM,
                "Name=operatorAddr", "Value=饿额", ENDITEM,
                "Name=operatorSex", "Value=0", ENDITEM,
                "Name=operatorBirth", "Value=2008-7-3", ENDITEM,
                "Name=operatorPhone", "Value=0591-3541789", ENDITEM,
                LAST);

    web_url("newEmployeeAction.do_5",
                "URL=http://192.168.1.188:8090/mainsale/newEmployeeAction.do?",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.1.188:8090/mainsale/login.do",
                "Snapshot=t16.inf",
                "Mode=HTML",
                LAST);

    web_custom_request("itemsBeans.findList_6",
                "URL=http://192.168.1.188:8090/mainsale/dwr/exec/itemsBeans.findList",
                "Method=POST",
                "Resource=1",
                "RecContentType=text/plain",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do?",
                "Snapshot=t17.inf",
                "EncType=",
                "Body=callCount=1\n"
                "c0-scriptName=itemsBeans\n"
                "c0-methodName=findList\n"
                "c0-id=7171_1215142113687\n"
                "c0-param0=string:select%20c.cityId%2Cc.cityName%20from%20City%20c\n"
                "c0-param1=string:\n"
                "xml=true\n",
                LAST);

    web_submit_data("newEmployeeAction.do_6",
                "Action=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do?",
                "Snapshot=t18.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=command", "Value=query", ENDITEM,
                "Name=id", "Value=", ENDITEM,
                "Name=cityId", "Value=全部", ENDITEM,
                EXTRARES,
                "Url=images/left_linkbg.jpg", "Referer=http://192.168.1.188:8090/mainsale/menu.do", ENDITEM,
                LAST);

    web_custom_request("itemsBeans.findList_7",
                "URL=http://192.168.1.188:8090/mainsale/dwr/exec/itemsBeans.findList",
                "Method=POST",
                "Resource=1",
                "RecContentType=text/plain",
                "Referer=http://192.168.1.188:8090/mainsale/newEmployeeAction.do",
                "Snapshot=t19.inf",
                "EncType=",
                "Body=callCount=1\n"
                "c0-scriptName=itemsBeans\n"
                "c0-methodName=findList\n"
                "c0-id=9354_1215142115937\n"
                "c0-param0=string:select%20c.cityId%2Cc.cityName%20from%20City%20c\n"
                "c0-param1=string:\n"
                "xml=true\n",
                LAST);

    return 0;
}
回放日志:
检测不到错误
但是回放概要那边的回放状态:失败
发生时间         代码      描述
Action.c(45)           -26612       错误-26612:
              对于“http://192.168.1.188:8090/mainsale/newEmployeeAction.do”,HTTP
                             状态代码=500(Internal server Error [Msg Id:MERR-26612
作者: jasonxu    时间: 2008-7-4 14:34
HTTP 500的错误,内部服务器错误
具体的请看这个http://zhidao.baidu.com/question/5561916.html?si=1
我不知道是不是这个问题,希望对你有帮助
作者: haitun509    时间: 2008-7-4 15:07
我也GOOGLE了下,HTTP 500是内部服务器的问题,但是不知道具体是服务器那边出问题,很纳闷........




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