51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 1200|回复: 1
打印 上一主题 下一主题

[原创] 单用户pass 多用户会出现会出错

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2012-4-1 19:23:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
代码
Action()
{

        web_reg_find("Text=网上银行管理系统",
                LAST);

        web_url("index_6100.jsp",
                "URL=http://172.31.17.115:59080/innermanageTest/index_6100.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=images/logon/login_s/big-bg.jpg", ENDITEM,
                "Url=images/logon/login_s/loginbg.jpg", ENDITEM,
                "Url=images/logo/6100_logo.png", "Referer=", ENDITEM,
                "Url=images/logon/login_s/footerbg.jpg", ENDITEM,
                "Url=images/logon/login_s/point.jpg", ENDITEM,
                LAST);

        web_submit_data("bankAdviceQuery.do",
                "Action=http://172.31.17.115:59080/innermanageTest/bankAdviceQuery.do?openNode=6100",
                "Method=POST",
                "RecContentType=text/xml",
                "Referer=http://172.31.17.115:59080/innermanageTest/index_6100.jsp",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                LAST);

        web_reg_find("Text=内部管理系统",
                LAST);

        lr_think_time(5);
        web_set_max_html_param_len("999999");
        web_reg_save_param("corre",
                "LB=EMP_SID=",
                "RB=\';",
                 "Ord=ALL",
                LAST);

        web_submit_data("signIn.do",
                "Action=http://172.31.17.115:59080/innermanageTest/signIn.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://172.31.17.115:59080/innermanageTest/index_6100.jsp",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=logonType", "Value=first", ENDITEM,
                "Name=userId", "Value=6100{userid}", ENDITEM,
                "Name=branchId", "Value=6100", ENDITEM,
                "Name=password", "Value=123456", ENDITEM,
                "Name=checkCode", "Value=a", ENDITEM,
                EXTRARES,
                "Url=images/default/menu_bg01.gif", ENDITEM,
                "Url=images/default/page_leftbg.gif", ENDITEM,
                "Url=images/default/user_bg.gif", ENDITEM,
                "Url=images/default/header_bg.gif", ENDITEM,
                "Url=images/default/header_l.gif", ENDITEM,
                "Url=images/default/top_rbg.gif", ENDITEM,
                "Url=images/default/h_icon.gif", ENDITEM,
                "Url=images/default/icon_exit.gif", ENDITEM,
                "Url=images/default/ico_19.gif", ENDITEM,
                "Url=images/default/menu_bg_top.gif", ENDITEM,
                "Url=images/default/ico_20.gif", ENDITEM,
                "Url=images/default/m1_0.gif", ENDITEM,
                "Url=images/default/footer_bg.gif", ENDITEM,
                "Url=images/default/menu3_divide.gif", ENDITEM,
                "Url=images/default/banner_bg.gif", "Referer=http://172.31.17.115:59080/innermanageTest/showWelcome.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/bankNoticeArea_bg.jpg", "Referer=http://172.31.17.115:59080/innermanageTest/showWelcome.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/point2.gif", "Referer=http://172.31.17.115:59080/innermanageTest/showWelcome.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/icon_sz.gif", "Referer=http://172.31.17.115:59080/innermanageTest/showWelcome.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/icon_minus.gif", ENDITEM,
                "Url=images/default/user_bottom.gif", ENDITEM,
                "Url=images/default/user_top.gif", ENDITEM,
                "Url=images/default/arrow_m_on.gif", ENDITEM,
                "Url=images/default/m1_0_on.gif", ENDITEM,
                "Url=images/default/dot3.gif", ENDITEM,
                LAST);

        /* Request with GET method to URL "http://172.31.17.115:59080/innermanageTest/scripts/softkey.js" failed during recording. Server response : 404*/

        /* Request with GET method to URL "http://172.31.17.115:59080/innermanageTest/scripts/main.js" failed during recording. Server response : 404*/

        /* Request with GET method to URL "http://172.31.17.115:59080/innermanageTest/password_js.jsp" failed during recording. Server response : 404*/

        web_submit_data("queryPerbankQueueCountAjax.do",
                "Action=http://172.31.17.115:59080/innermanageTest/queryPerbankQueueCountAjax.do?EMP_SID={corre_1}",
                "Method=POST",
                "RecContentType=text/xml",
                "Referer=http://172.31.17.115:59080/innermanageTest/signIn.do",
                "Snapshot=t4.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=turnPageShowNum", "Value=10", ENDITEM,
                "Name=turnPageBeginPos", "Value=1", ENDITEM,
                "Name=turnPageTotalNum", "Value=100", ENDITEM,
                LAST);

        web_submit_data("newbankNoticeQueryAjax.do",
                "Action=http://172.31.17.115:59080/innermanageTest/newbankNoticeQueryAjax.do?EMP_SID={corre_1}",
                "Method=POST",
                "RecContentType=text/xml",
                "Referer=http://172.31.17.115:59080/innermanageTest/showWelcome.do?EMP_SID={corre_1}",
                "Snapshot=t5.inf",
                "Mode=HTML",
                ITEMDATA,
                LAST);

        web_submit_data("queryAuthQueueCountAjax.do",
                "Action=http://172.31.17.115:59080/innermanageTest/queryAuthQueueCountAjax.do?EMP_SID={corre_1}",
                "Method=POST",
                "RecContentType=text/xml",
                "Referer=http://172.31.17.115:59080/innermanageTest/signIn.do",
                "Snapshot=t6.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=turnPageShowNum", "Value=10", ENDITEM,
                "Name=turnPageBeginPos", "Value=1", ENDITEM,
                "Name=turnPageTotalNum", "Value=100", ENDITEM,
                EXTRARES,
                "Url=images/default/point.jpg", "Referer=http://172.31.17.115:59080/innermanageTest/showWelcome.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/Monitor.gif", "Referer=http://172.31.17.115:59080/innermanageTest/showWelcome.do?EMP_SID={corre_1}", ENDITEM,
                LAST);

        web_url("pbCertDownload.do",
                "URL=http://172.31.17.115:59080/innermanageTest/pbCertDownload.do?EMP_SID={corre_1}",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://172.31.17.115:59080/innermanageTest/signIn.do",
                "Snapshot=t7.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=images/default/form_icon.gif", "Referer=http://172.31.17.115:59080/innermanageTest/pbCertDownload.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/c_bg.gif", "Referer=http://172.31.17.115:59080/innermanageTest/pbCertDownload.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/button_common_bg.gif", "Referer=http://172.31.17.115:59080/innermanageTest/pbCertDownload.do?EMP_SID={corre_1}", ENDITEM,
                "Url=images/default/ico_06.gif", "Referer=http://172.31.17.115:59080/innermanageTest/pbCertDownload.do?EMP_SID={corre_1}", ENDITEM,
                LAST);
        lr_think_time(14);
       
    web_reg_save_param("ly",
                "LB=@v@",
                "RB=,ou=Cu",
                "Ord=ALL",
                LAST);
                web_reg_save_param("lz",
                "LB=submitTimestamp\" value=\"",
                "RB=\"",
                "Ord=ALL",
                LAST);
        web_reg_save_param("lx",
                "LB=name=\"refNo\" value=\"",
                "RB=\"",
                "Ord=ALL",
                LAST);
        web_reg_save_param("lc",
                "LB=name=\"authCode\" value=\"",
                "RB=\"",
                "Ord=ALL",
                LAST);


        web_submit_data("pbCertDownloadQuery.do",
                "Action=http://172.31.17.115:59080/innermanageTest/pbCertDownloadQuery.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://172.31.17.115:59080/innermanageTest/pbCertDownload.do?EMP_SID={corre_1}",
                "Snapshot=t8.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=EMP_SID", "Value={corre_1}", ENDITEM,
                "Name=flag", "Value=", ENDITEM,
                "Name=certType", "Value=01", ENDITEM,
                "Name=certNo", "Value={imid}", ENDITEM,
                EXTRARES,
                "Url=images/default/list_title_bg.gif", ENDITEM,
                "Url=images/default/pad_shade.gif", ENDITEM,
                LAST);

       
        lr_think_time(9);

        web_submit_data("tellerQueryAuth.do",
                "Action=http://172.31.17.115:59080/innermanageTest/tellerQueryAuth.do?EMP_SID={corre_1}",
                "Method=POST",
                "RecContentType=text/xml",
                "Referer=http://172.31.17.115:59080/innermanageTest/pbCertDownloadQuery.do",
                "Snapshot=t9.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=authTeller", "Value=6100{authid}", ENDITEM,
                LAST);

                //添加个人证书申请事务。
        lr_start_transaction("个人证书下载");

        //设置检查点。
        web_reg_find("Search=Body",
                "SaveCount=flag",
                "Text=证书安装成功",
                LAST);


        web_submit_data("pbCertDownloadSubmit.do",
                "Action=http://172.31.17.115:59080/innermanageTest/pbCertDownloadSubmit.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://172.31.17.115:59080/innermanageTest/pbCertDownloadQuery.do",
                "Snapshot=t10.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=EMP_SID", "Value={corre_1}", ENDITEM,
                "Name=submitTimestamp", "Value={lz_1}", ENDITEM,
                "Name=refNo", "Value={lx_1}", ENDITEM,
                "Name=authCode", "Value={lc_1}", ENDITEM,
                "Name=pkcs10", "Value=MIIDMTCCApoCAQAwgZkxTTBLBgNVBAMeRAAwADYAMwBAADAAMwAyADAANwA5ADEA\r"/iRU=\r\n", ENDITEM,
                "Name=cstNo", "Value={cstno}", ENDITEM,
                "Name=dn", "Value=cn=063@0{imid}@v@{ly_1},ou=Customers,ou=ncc,o=ncc operation ca,c=cn", ENDITEM,
                "Name=custType", "Value=0", ENDITEM,
                "Name=equipType", "Value=0", ENDITEM,
                "Name=authTeller", "Value=6100{authid}", ENDITEM,
                "Name=authTellerPwd", "Value=123456", ENDITEM,
                "Name=equipNo", "Value={equipno}", ENDITEM,
                LAST);

        //判断个人证书下载是否成功,并设置事务的结束状态。
        if(atoi(lr_eval_string("{flag}")) >= 1)
                lr_end_transaction("个人证书下载", LR_PASS);
        else
                lr_end_transaction("个人证书下载",LR_FAIL);


        web_url("pbCertDownload.do_2",
                "URL=http://172.31.17.115:59080/innermanageTest/pbCertDownload.do?EMP_SID={corre_1}",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://172.31.17.115:59080/innermanageTest/signIn.do",
                "Snapshot=t11.inf",
                "Mode=HTML",
                LAST);

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

使用道具 举报

  • TA的每日心情
    奋斗
    2022-5-8 19:23
  • 签到天数: 137 天

    连续签到: 1 天

    [LV.7]测试师长

    2#
    发表于 2012-4-4 21:27:40 | 只看该作者
    这脚本太多,很难看
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-5-6 18:58 , Processed in 0.080654 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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