51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1971|回复: 7
打印 上一主题 下一主题

[原创] 如何测填报页面的压力?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-4-24 09:33:01 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我把登录放在init里面,然后参数化登录的用户名,把里面填报页面的动作放在Action里面,回放时不成功,是否是填报页面的session未获取到啊?
下面是我的脚本:
vuser_init()
{
        web_set_max_html_param_len("1024");

        /* Registering parameter(s) from source task id 2
        // {Siebel_Analytic_ViewState2} = "/wEPDwUKLTI5ODM3NjExN2RkjUBcQcHncAZi/3rJKmAzIv61dPE="
        // */
        web_reg_save_param("Siebel_Analytic_ViewState2",
                "LB/IC=ViewState\" value=\"",
                "RB/IC=\"",
                "Ord=1",
                "Search=Body",
                "RelFrameId=1",
                LAST);

        web_url("Login.aspx",
                "URL=http://192.168.5.117:85/Authentication/Login.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../WebResource.axd?d=CvzYHb4BTDj1AxWusb8TyA2&t=633698821951078750", ENDITEM,               
                LAST);

        lr_think_time( 24 );

        web_submit_data("Login.aspx_2",
                "Action=http://192.168.5.117:85/Authentication/Login.aspx",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.5.117:85/Authentication/Login.aspx",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=__EVENTTARGET", "Value=", ENDITEM,
                "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                "Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$tesc_username", "Value={orgCode}", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$tesc_userpassword", "Value=11111111", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$tesc_yanzhengma", "Value=vafezs", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$btnLogin", "Value=登录", ENDITEM,
                "Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
                "Name=__EVENTVALIDATION", "Value=/wEWBwLw8JPCAwLP4KMJAr2K9qkLArip+NgKAo7175EBAtDA964PAoeritsDR07aKI5AY7pT0neyqkks0wCtwyw=", ENDITEM,
                EXTRARES,
                "Url=../App_Themes/Default/images/DF1.jpg", "Referer=http://192.168.5.117:85/Stat/Default.aspx", ENDITEM,
                LAST);

        return 0;
}

Action()
{
        web_url("StatServices.aspx",
                "URL=http://192.168.5.117:85/Stat/StatServices.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.5.117:85/Stat/Default.aspx",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,               
                "Url=../App_Themes/Default/images/DF1.jpg", ENDITEM,               
                LAST);

        lr_think_time( 5 );

        /* Registering parameter(s) from source task id 57
        // {Siebel_Analytic_ViewState6} = "/wEPDwULLTE2MzkyMzc2ODAPFgIeCUlzTmV3Rm9ybWgWAmYPZBYCAgMPZBYGAgMPDxYCHgRUZXh0BQUxMTExMWRkAgUPZBYCAgEPDxYCHwEFHDIwMDnlubQwNOaciDIz5pelIOasoui/juaCqCBkZAIHD2QWAgIBD2QWAmYPZBYYAgEPDxYCHwEFBDIwMDhkZAIDDw8WAh8BBQo2MDczMjIyMy0zZGQCBQ8PFgIfAWRkZAKLAg8QZBAVBAzor7fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBAgNkAo0CDxBkEBUUDOivt+mAieaLqS4uLgnpu4TmtabljLoJ5Y2i5rm+5Yy6CeW+kOaxh+WMugnplb/lroHljLoJ6Z2Z5a6J5Yy6CeaZrumZgOWMugnpl7jljJfljLoJ6Jm55Y+j5Yy6CeadqOa1puWMugnpl7XooYzljLoJ5a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fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBAgNkApkCDxBkEBUUDOivt+mAieaLqS4uLgnpu4TmtabljLoJ5Y2i5rm+5Yy6CeW+kOaxh+WMugnplb/lroHljLoJ6Z2Z5a6J5Yy6CeaZrumZgOWMugnpl7jljJfljLoJ6Jm55Y+j5Yy6CeadqOa1puWMugnpl7XooYzljLoJ5a6d5bGx5Yy6CeWYieWumuWMugzmtabkuJzmlrDljLoJ6YeR5bGx5Yy6CeWNl+axh+WMugnlpYnotKTljLoJ5p2+5rGf5Yy6Cemdkua1puWMugnltIfmmI7ljr8VFAQwMDAwBjMxMDEwMQYzMTAxMDMGMzEwMTA0BjMxMDEwNQYzMTAxMDYGMzEwMTA3BjMxMDEwOAYzMTAxMDkGMzEwMTEwBjMxMDExMgYzMTAxMTMGMzEwMTE0BjMxMDExNQYzMTAxMTYGMzEwMjI1BjMxMDIyNgYzMTAyMjcGMzEwMjI5BjMxMDIzMBQrAxRnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZxYBAgdkApsCDw8WAh8BBQYzMTAxMDhkZGR0pw1HbNeWvN9zD+HjhWzNvxeHew=="
        // */
        web_reg_save_param("Siebel_Analytic_ViewState6",
                "LB/IC=ViewState\" value=\"",
                "RB/IC=\"",
                "Ord=1",
                "Search=Body",
                "RelFrameId=1",
                LAST);

        web_link("填报",
                "Text=填报",
                "Snapshot=t4.inf",
                EXTRARES,               
                "Url=../App_Themes/Default/images/DF1.jpg", ENDITEM,               
                LAST);

        web_set_max_html_param_len("2376");

        web_submit_data("techsurvey.aspx",
                "Action=http://192.168.5.117:85/Stat/techsurvey.aspx",
                "Method=POST",
                "RecContentType=text/plain",
                "Referer=http://192.168.5.117:85/Stat/techsurvey.aspx",
                "Mode=HTML",
                ITEMDATA,
                "Name=ctl00$ScriptManager1", "Value=ctl00$ContentPlaceHolder1$UpdatePanel1|ctl00$ContentPlaceHolder1$btnSave", ENDITEM,
                "Name=__EVENTTARGET", "Value=", ENDITEM,
                "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                "Name=__LASTFOCUS", "Value=", ENDITEM,
                "Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState6}", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$tesc_01", "Value=1001", ENDITEM,               
                "Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
                "Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
                "Name=__SCROLLPOSITIONY", "Value=593", ENDITEM,
                "Name=__EVENTVALIDATION", "Value=/wEWegL+zcbECwKWue+bAQK7upyIDALBurDjBAK8upyIDAKyurDjBAK9upyIDAK+upyIDAKzurDjBAK/upyIDAK6uvTRCgLAupyIDAK7uvTRCgK8uvTRCgLBupyIDAKyupyIDAK9uvTRCgKzupyIDAK+uvTRCgK6urDjBAK/uvTRCgK7urDjBALAuvTRCgK8urDjBALBuvTRCgK9urDjBAKyuvTRCgKzuvTRCgK+urDjBAK6uoitAwK/urDjBAK7uoitAwLAurDjBAK8uoitAwK7uvDfDQK6/o+sAwKQ0IKWCAKystb7DALi69+2CAKd0IaWCALpwrbsBALD7PvrBAKk0fquBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKk0fKuBgKk0YauBgKk0ZquBgKn0eauBgKn0e6uBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKi0Z6LDQKi0YKLDQKi0YaLDQKi0a6LDQKl0YqLDQK7/o+sAwKR0IKWCAKzstb7DALj69+2CAKc0IaWCALqwrbsBALA7PvrBAKn0fquBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKn0fKuBgKn0YauBgKn0ZquBgKk0eauBgKk0e6uBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKh0Z6LDQKh0YKLDQKh0YaLDQKh0a6LDQKm0YqLDQK8/o+sAwKW0IKWCAK0stb7DALk69+2CAKb0IaWCALrwrbsBALB7PvrBAKm0fquBgKm0eKuBgKm0fauBgKm0YquBgKm0f6uBgKm0fKuBgKm0YauBgKm0ZquBgKl0eauBgKl0e6uBgKl0eKuBgKl0fauBgKl0YquBgKl0f6uBgKg0Z6LDQKg0YKLDQKg0YaLDQKg0a6LDQKn0YqLDQKx8JKCCQKCrOzBBwLnws6sDQK4/qfsCwKokaLfCgKC6KGpBgL40JWiCgLQwPeuDwKHq4rbA/nkpIXnJOuC++0MvDcWIPsPwkcT", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$btnSave", "Value=保存", ENDITEM,
                EXTRARES,
                "Url=../ScriptResource.axd?d=5oF26sQQPE-WpL1ik1X6570z8dOTm4wJwEQs4eQkxIPcQNJRI1I6Ix8QOQsXNCu6E8YSZjhWfPdEGHc7qonIjQ2&t=633698821951078750", ENDITEM,
                LAST);

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

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2009-4-24 09:34:27 | 只看该作者
原因是否为登录的用户名参数化后,其填报页面的Siebel_Analytic_ViewState6每次都是不同的?该如何解决呢?
回复 支持 反对

使用道具 举报

  • TA的每日心情

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

    连续签到: 1 天

    [LV.2]测试排长

    3#
    发表于 2009-4-24 10:01:07 | 只看该作者
    查看你的脚本关联存在问题
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
     楼主| 发表于 2009-4-24 10:03:52 | 只看该作者
    具体什么地方呀?上面两个viewstate关联是系统自动生成,请高手指教哦
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
     楼主| 发表于 2009-4-24 14:49:37 | 只看该作者
    help me~help you!
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
     楼主| 发表于 2009-4-24 17:14:43 | 只看该作者
    Action()
    {
    // [WCSLEN] Maximum parameter length changed by Correlation Studio
            web_set_max_html_param_len( "9999" );
            web_url("StatServices.aspx",
                    "URL=http://192.168.5.117:85/Stat/StatServices.aspx",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://192.168.5.117:85/Stat/Default.aspx",
                    "Snapshot=t3.inf",
                    "Mode=HTML",
                    EXTRARES,
                    "Url=../App_Themes/Default/styleimages/btbj.jpg", ENDITEM,
                    LAST);

            /* Registering parameter(s) from source task id 57
            // {Siebel_Analytic_ViewState6} = "/wEPDwULLTEzMzY0NDE1NjMPFgIeCUlzTmV3Rm9ybWgWAmYPZBYCAgMPZBYGAgMPDxYCHgRUZXh0BQUxMTExMWRkAgUPZBYCAgEPDxYCHwFkZGQCBw9kFgICAQ9kFgJmD2QWGgIBDw8WAh8BBQQyMDA4ZGQCAw8PFgIfAQUO5rKq56eR5rCR6LCDMDFkZAIFDw8WAh8BBQo2MzIwNTEzMi00ZGQCBw8PFgIfAWRkZAKNAg8QZBAVBAzor7fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBZmQCjwIPEA8WAh4HVmlzaWJsZWhkEBUAFQAUKwMAFgBkApECDw8WAh8BZGRkApMCDxBkEBUEDOivt+mAieaLqS4uLgbmtbflpJYS5Zu95YaF5YW25LuW55yB5biCBuacrOW4ghUEAzAwMAY4ODg4ODgGODYwMDAwAzMxMBQrAwRnZ2dnFgFmZAKVAg8QDxYCHwJoZBAVABUAFCsDABYAZAKXAg8PFgIfAWRkZAKZAg8QZBAVBAzor7fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBZmQCmwIPEA8WAh8CaGQQFQAVABQrAwAWAGQCnQIPDxYCHwFkZGRkEGW/SeGseD4m792Z31k1olTR1so="
            // */
            web_reg_save_param("Siebel_Analytic_ViewState6",
                    "LB/IC=ViewState\" value=\"",
                    "RB/IC=\"",
                    "Ord=1",
                    "Search=Body",
                    "RelFrameId=1",
                    LAST);

            // [WCSPARAM WCSParam_Diff1 504 /wEWOwLHrvN8Apa575sBAru6nIgMAsG6sOMEAry6nIgMArK6sOMEAr26nIgMAr66nIgMArO6sOMEAr+6nIgMArq69NEKAsC6nIgMAru69NEKAry69NEKAsG6nIgMArK6nIgMAr269NEKArO6nIgMAr669NEKArq6sOMEAr+69NEKAru6sOMEAsC69NEKAry6sOMEAsG69NEKAr26sOMEArK69NEKArO69NEKAr66sOMEArq6iK0DAr+6sOMEAru6iK0DAsC6sOMEAry6iK0DAru68N8NArr+j6wDApDQgpYIArKy1vsMAuLr37YIAp3QhpYIArv+j6wDApHQgpYIArOy1vsMAuPr37YIApzQhpYIArz+j6wDApbQgpYIArSy1vsMAuTr37YIApvQhpYIArHwkoIJAoKs7MEHAufCzqwNArj+p+wLAqiRot8KAoLooakGAvjQlaIKAtDA964PAoeritsD2x2Bj6/yw9p2PD9G1cyZDjSnL4Y=] Parameter {WCSParam_Diff1} created by Correlation Studio
            web_reg_save_param( "WCSParam_Diff1", "LB= value=\"", "RB=\"", "Ord=24", "Search=Body", "RelFrameId=1", LAST );
            web_link("填报",
                    "Text=填报",
                    "Snapshot=t4.inf",
                    EXTRARES,
                    "Url=../App_Themes/Default/styleimages/btbj.jpg", ENDITEM,
                    LAST);


            lr_start_transaction("tran1");

            web_submit_data("techsurvey.aspx",
                    "Action=http://192.168.5.117:85/Stat/techsurvey.aspx",
                    "Method=POST",
                    "RecContentType=text/plain",
                    "Referer=http://192.168.5.117:85/Stat/techsurvey.aspx",
                    "Mode=HTML",
                    ITEMDATA,
                    "Name=ctl00$ScriptManager1", "Value=ctl00$ContentPlaceHolder1$UpdatePanel1|ctl00$ContentPlaceHolder1$tesc_a2_1", ENDITEM,
                    "Name=__EVENTTARGET", "Value=ctl00$ContentPlaceHolder1$tesc_a2_1", ENDITEM,
                    "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                    "Name=__LASTFOCUS", "Value=", ENDITEM,
                    "Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState6}", ENDITEM,
                    "Name=ctl00$ContentPlaceHolder1$tesc_01", "Value=1001", ENDITEM,
                    "Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
                    "Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
                    "Name=__SCROLLPOSITIONY", "Value=595", ENDITEM,
                    "Name=__EVENTVALIDATION", "Value=/wEWegKcjKXmBQK7upyIDALBurDjBAK8upyIDAKyurDjBAK9upyIDAK+upyIDAKzurDjBAK/upyIDAK6uvTRCgLAupyIDAK7uvTRCgK8uvTRCgLBupyIDAKyupyIDAK9uvTRCgKzupyIDAK+uvTRCgK6urDjBAK/uvTRCgK7urDjBALAuvTRCgK8urDjBALBuvTRCgK9urDjBAKyuvTRCgKzuvTRCgK+urDjBAK6uoitAwK/urDjBAK7uoitAwLAurDjBAK8uoitAwK7uvDfDQK6/o+sAwKQ0IKWCAKystb7DALi69+2CAKd0IaWCALpwrbsBALD7PvrBAKk0fquBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKk0fKuBgKk0YauBgKk0ZquBgKn0eauBgKn0e6uBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKi0Z6LDQKi0YKLDQKi0YaLDQKi0a6LDQKl0YqLDQK7/o+sAwKR0IKWCAKzstb7DALj69+2CAKc0IaWCALqwrbsBALA7PvrBAKn0fquBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKn0fKuBgKn0YauBgKn0ZquBgKk0eauBgKk0e6uBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKh0Z6LDQKh0YKLDQKh0YaLDQKh0a6LDQKm0YqLDQK8/o+sAwKW0IKWCAK0stb7DALk69+2CAKb0IaWCALrwrbsBALB7PvrBAKm0fquBgKm0eKuBgKm0fauBgKm0YquBgKm0f6uBgKm0fKuBgKm0YauBgKm0ZquBgKl0eauBgKl0e6uBgKl0eKuBgKl0fauBgKl0YquBgKl0f6uBgKg0Z6LDQKg0YKLDQKg0YaLDQKg0a6LDQKn0YqLDQKx8JKCCQKCrOzBBwLnws6sDQK4/qfsCwKokaLfCgKC6KGpBgL40JWiCgKWue+bAQLQwPeuDwKHq4rbA3Zy/LIgVE/asrAbkc3vs0WfxsVF", ENDITEM,
                    "Name=ctl00$ContentPlaceHolder1$btnSave", "Value=保存", ENDITEM,
                    EXTRARES,
                    "Url=../ScriptResource.axd?d=5oF26sQQPE-WpL1ik1X6570z8dOTm4wJwEQs4eQkxIPcQNJRI1I6Ix8QOQsXNCu6E8YSZjhWfPdEGHc7qonIjQ2&t=633698821951078750", ENDITEM,
                    LAST);


            lr_end_transaction("tran1", LR_AUTO);

            return 0;
    }
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    7#
     楼主| 发表于 2009-4-24 17:16:32 | 只看该作者
    Action变成这样后回放成功,不过运行场景经常报错
    一.  Action.c(38): Error -26377: No match found for the requested parameter "Siebel_Analytic_ViewState6". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 9999 bytes, use web_set_max_html_param_len to increase the parameter size
    二.  Action.c(365): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://192.168.5.117:85/Stat/techsurvey.aspx"

    大侠们指点下是什么原因啊
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    8#
     楼主| 发表于 2009-4-27 09:26:45 | 只看该作者
    只有自己先抗起来了
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-19 14:38 , Processed in 0.079428 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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