51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2978|回复: 5
打印 上一主题 下一主题

[原创] 如果init和end里放代码为什么会出错?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-12-9 14:44:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
之前我在录制的时候,都是把init和end单独放着,然后把登陆和退出以及中间的业务操作都放到action里面,录制完成后回放没有问题。但是为什么现在我把登陆放到init里,然后退出放到end里,这时候,录制完成后回放就会报错,而且报错主要是集中在end和action里?哪位高人给看看?

    报的错如下:
Running Vuser...
Starting iteration 1.
Starting action Action.
Error: C interpreter run time error:  Error -- Unresolved symbol : Action.
Ending Vuser...
Starting action vuser_end.
Error: C interpreter run time error:  Error -- Unresolved symbol : vuser_end.


   楼下那位高人,我把代码打包发上来了,你帮忙看看,因为我同学非说是我rp问题导致代码出错,搞得我很郁闷。。。

[ 本帖最后由 sally_520xue 于 2008-12-9 15:38 编辑 ]

本帖子中包含更多资源

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

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

使用道具 举报

  • TA的每日心情

    2016-12-30 10:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]测试排长

    2#
    发表于 2008-12-9 14:47:52 | 只看该作者
    你得把代码放出来
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
     楼主| 发表于 2008-12-9 15:00:30 | 只看该作者
    vuser_init()
    {

            web_url("ico_MQP.gif",
                    "URL=http://bj.ganji.com/tpl/img/ico_MQP.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://bj.ganji.com/",
                    "Snapshot=t2.inf",
                    LAST);

            web_url("top_search.js",
                    "URL=http://bj.ganji.com/tpl/js/top_search.js?v=001",
                    "Resource=1",
                    "RecContentType=application/x-javascript",
                    "Referer=http://bj.ganji.com/",
                    "Snapshot=t3.inf",
                    LAST);

            web_url("ico_gs.gif",
                    "URL=http://bj.ganji.com/tpl/img/ico_gs.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://bj.ganji.com/",
                    "Snapshot=t4.inf",
                    LAST);

            web_add_cookie("WT_FPC=id=24ca28f1c5dc7a4cf0e1228788628250:lv=1228788628250:ss=1228788628250; DOMAIN=www.ganji.com");

            web_add_cookie("__utma=42433715.2478934609609497600.1228788630.1228788630.1228788630.1; DOMAIN=www.ganji.com");

            web_add_cookie("__utmz=42433715.1228788630.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); DOMAIN=www.ganji.com");

            web_add_cookie("visitedfid=31D70; DOMAIN=www.ganji.com");

            web_add_cookie("oldtopics=D404645D; DOMAIN=www.ganji.com");

            web_add_cookie("fid31=1228790570; DOMAIN=www.ganji.com");

            web_url("L_Get_Cid.php",
                    "URL=http://bj.ganji.com/L_Get_Cid.php?_TYPE=GET_CITY_ID&CITY=bj",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://bj.ganji.com/",
                    "Snapshot=t5.inf",
                    "Mode=HTML",
                    EXTRARES,
                    "Url=http://www.google-analytics.com/ga.js", "Referer=http://bj.ganji.com/", ENDITEM,
                    "Url=/tpl/img/ico_liDot.gif", "Referer=http://bj.ganji.com/", ENDITEM,
                    "Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=296890368&utmhn=bj.ganji.com&utmcs=gb2312&utmsr=1440x900&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r12&utmdt=%E5%8C%97%E4%BA%AC%E5%88%86%E7%B1%BB%E4%BF%A1%E6%81%AF-%E8%B5%B6%E9%9B%86%E7%BD%91&utmhid=1152001894&utmr=-&utmp=/&utmac=UA-479320-1&utmcc=__utma%3D25608046.4410754793292936000.1228789874.1228793938.1228794091.4%3B%2B__utmz%3D25608046.1228789874.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", "Referer=http://"
                    "bj.ganji.com/", ENDITEM,
                    "Url=http://www.ganji.com/js/shouye_dcs_tag.js", "Referer=http://bj.ganji.com/", ENDITEM,
                    LAST);

            web_add_cookie("__utma=25608046.4410754793292936000.1228789874.1228793938.1228794091.4; DOMAIN=bj.ganji.com");

            web_add_cookie("WT_FPC=id=26c55d0ae960fe7f1771228789873859:lv=1228794093015:ss=1228793570671; DOMAIN=bj.ganji.com");

            web_add_cookie("__utmb=25608046.1.10.1228794091; DOMAIN=bj.ganji.com");

            web_add_cookie("__utmc=25608046; DOMAIN=bj.ganji.com");

            web_add_cookie("ACOOKIE=C8ctADYxLjQ4LjIyMy4xODUtMTM1ODI3ODg5Ni4yOTk3Mjg5OQAAAAAAAAABAAAAAQAAAIjoPUnp5j1JAQAAAAEAAACI6D1J6eY9SQAAAAA-; DOMAIN=log.ganji.com");

            web_add_cookie("__utma=42433715.2478934609609497600.1228788630.1228788630.1228788630.1; DOMAIN=log.ganji.com");

            web_add_cookie("__utmz=42433715.1228788630.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); DOMAIN=log.ganji.com");

            web_add_cookie("visitedfid=31D70; DOMAIN=log.ganji.com");

            web_add_cookie("oldtopics=D404645D; DOMAIN=log.ganji.com");

            web_add_cookie("fid31=1228790570; DOMAIN=log.ganji.com");

            web_add_cookie("WT_FPC=id=26c55d0ae960fe7f1771228789873859:lv=1228794101046:ss=1228793570671; DOMAIN=bj.ganji.com");

            web_add_cookie("__utmb=25608046.2.10.1228794091; DOMAIN=bj.ganji.com");

            web_url("login",
                    "URL=http://bj.ganji.com/user/login/",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://bj.ganji.com/",
                    "Snapshot=t6.inf",
                    "Mode=HTML",
                    EXTRARES,
                    "Url=http://log.ganji.com/dcsslry2e10000kflm65jfd4c_7b4t/dcs.gif?&dcsdat=1228794093015&dcssip=bj.ganji.com&dcsuri=/&WT.co_f=26c55d0ae960fe7f1771228789873859&WT.vt_f=0&WT.vt_f_a=0&WT.vt_sid=26c55d0ae960fe7f1771228789873859.1228793570671", "Referer=http://bj.ganji.com/", ENDITEM,
                    "Url=/tpl/js/prototype.js", ENDITEM,
                    "Url=/tpl/js/CreateWindow.js", ENDITEM,
                    "Url=http://log.ganji.com/dcss9qpl5lgucbm4m9qya2633_7y7o/dcs.gif?&dcsdat=1228794101046&dcssip=bj.ganji.com&dcsuri=/user/login/&dcsref=http://bj.ganji.com/&WT.co_f=26c55d0ae960fe7f1771228789873859&WT.vt_f=0&WT.vt_f_a=0&WT.vt_sid=26c55d0ae960fe7f1771228789873859.1228793570671", ENDITEM,
                    "Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=1926785365&utmhn=bj.ganji.com&utmcs=gb2312&utmsr=1440x900&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r12&utmdt=%E8%B5%B6%E9%9B%86%E7%BD%91%20-%20%E7%99%BB%E5%BD%95&utmhid=90412567&utmr=0&utmp=/user/login/&utmac=UA-479320-1&utmcc=__utma%3D25608046.4410754793292936000.1228789874.1228793938.1228794091.4%3B%2B__utmz%3D25608046.1228789874.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", ENDITEM,
                    "Url=/tpl/post/images/bg_countyList.gif", ENDITEM,
                    LAST);

            web_submit_form("login.php",
                    "Snapshot=t7.inf",
                    ITEMDATA,
                    "Name=email", "Value=sally_520xue", ENDITEM,
                    "Name=password", "Value=821124", ENDITEM,
                    "Name=setcookie", "Value=1", ENDITEM,
                    "Name=Submit1", "Value=登录", ENDITEM,
                    LAST);

            web_add_cookie("WT_FPC=id=2348473a07b4df7db121228788638453:lv=1228793642453:ss=1228793642453; DOMAIN=club.ganji.com");

            web_add_cookie("__utma=246460246.1838186937441772800.1228788640.1228788640.1228793643.2; DOMAIN=club.ganji.com");

            web_add_cookie("__utmz=246460246.1228788640.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); DOMAIN=club.ganji.com");

            web_add_cookie("__utmb=246460246.1.10.1228793643; DOMAIN=club.ganji.com");

            web_add_cookie("__utma=42433715.2478934609609497600.1228788630.1228788630.1228788630.1; DOMAIN=club.ganji.com");

            web_add_cookie("__utmz=42433715.1228788630.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); DOMAIN=club.ganji.com");

            web_add_cookie("visitedfid=31D70; DOMAIN=club.ganji.com");

            web_add_cookie("oldtopics=D404645D; DOMAIN=club.ganji.com");

            web_add_cookie("fid31=1228790570; DOMAIN=club.ganji.com");

            web_url("passport.php",
                    "URL=http://club.ganji.com/api/passport.php?action=login&auth=V2AEP1JgUj1QalI2USVWOQszADNXbVJnAzQCNwI6V21TPwRgAWkANFUzUHdUIFU6Bj4GNVxmBzICNQw5AzsFMFc6BGRSPlJmUDZSdVEkViMLOwAkVz5SNwNrAmACP1cmU2YEPAEwAH1VWVBkVGZVYwYrBiVcPgclAncMagNwBXRXdAQ%2FUn1SMlA%2BUjFRNFZoC2cAYldjUmQDMQIzAjdXYlM%2FBGEBbABhVWRQYFRkVWYGMQZlXGIHMQJjDDIDYQUxVzcEaFI6UjVQMFJ1UTRWPQs%2FAD9XPFJrA3UCZAJuVzlTfgQPAWkANlU2UClUIVU2BnYGZFxrB3oCZgxjA2wFaFctBDNSYFI7UC1SMFE%2F&forward="
                    "http%3A%2F%2Fbj.ganji.com%2Fuser%2Flogin.php%3Fshow%3D1%26forward%3Dhttp%253A%252F%252Fbj.ganji.com&verify=a926127fb01162e67b9e9fa9c8591bf3&noforward=1",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://bj.ganji.com/user/login.php",
                    "Mode=HTML",
                    LAST);

            web_url("login.php_2",
                    "URL=http://bj.ganji.com/user/login.php?show=1&forward=http%3A%2F%2Fbj.ganji.com",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=",
                    "Snapshot=t8.inf",
                    "Mode=HTML",
                    EXTRARES,
                    "Url=http://log.ganji.com/dcss9qpl5lgucbm4m9qya2633_7y7o/dcs.gif?&dcsdat=1228794111531&dcssip=bj.ganji.com&dcsuri=/user/login.php&dcsqry=%3Fshow=1%26forward=http%3A%2F%2Fbj.ganji.com&WT.co_f=26c55d0ae960fe7f1771228789873859&WT.vt_f=0&WT.vt_f_a=0&WT.vt_sid=26c55d0ae960fe7f1771228789873859.1228793570671", "Referer=http://bj.ganji.com/user/login.php?show=1&forward=http%3A%2F%2Fbj.ganji.com", ENDITEM,
                    "Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=1238114432&utmhn=bj.ganji.com&utmcs=gb2312&utmsr=1440x900&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r12&utmdt=%E8%B5%B6%E9%9B%86%E7%BD%91%20-%20%E7%99%BB%E5%BD%95&utmhid=1268918068&utmr=-&utmp=/user/login.php?show=1&forward=http://bj.ganji.com&utmac=UA-479320-1&utmcc=__utma%3D25608046.4410754793292936000.1228789874.1228793938.1228794091.4%3B%2B__utmz%3D25608046.1228789874.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B",
                    "Referer=http://bj.ganji.com/user/login.php?show=1&forward=http%3A%2F%2Fbj.ganji.com", ENDITEM,
                    LAST);

            web_add_cookie("WT_FPC=id=26c55d0ae960fe7f1771228789873859:lv=1228794111531:ss=1228793570671; DOMAIN=bj.ganji.com");

            web_add_cookie("__utmb=25608046.3.10.1228794091; DOMAIN=bj.ganji.com");

            lr_think_time(5);

            web_link("首页",
                    "Text=首页",
                    "Snapshot=t9.inf",
                    EXTRARES,
                    "Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=219623639&utmhn=bj.ganji.com&utmcs=gb2312&utmsr=1440x900&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r12&utmdt=%E5%8C%97%E4%BA%AC%E5%88%86%E7%B1%BB%E4%BF%A1%E6%81%AF-%E8%B5%B6%E9%9B%86%E7%BD%91&utmhid=1968440988&utmr=-&utmp=/&utmac=UA-479320-1&utmcc=__utma%3D25608046.4410754793292936000.1228789874.1228793938.1228794091.4%3B%2B__utmz%3D25608046.1228789874.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", ENDITEM,
                    LAST);

            web_url("L_Get_Cid.php_2",
                    "URL=http://bj.ganji.com/L_Get_Cid.php?_TYPE=GET_CITY_ID&CITY=bj",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://bj.ganji.com/",
                    "Snapshot=t10.inf",
                    "Mode=HTML",
                    LAST);
    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2016-12-30 10:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]测试排长

    4#
    发表于 2008-12-9 15:15:14 | 只看该作者
    你最好把你的脚本保存成lr文件打包放上来。但看这些代码我没有发现问题,你这段代码是放在哪儿的?都是在init里吗?
    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2016-12-30 10:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]测试排长

    5#
    发表于 2008-12-9 16:08:38 | 只看该作者
    错误就是你的脚本中
    action缺少Action(){......}
    vuser_end缺少vuser_end(){......}


    [ 本帖最后由 iori 于 2008-12-9 16:12 编辑 ]

    本帖子中包含更多资源

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

    x
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
     楼主| 发表于 2008-12-12 16:52:19 | 只看该作者
    额。。。谢谢达人帮忙,这两天忙的晕头转向的,晚上回去立马试试去。多谢多谢!!
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-16 07:54 , Processed in 0.085001 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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