51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[求助] lr如何对cas单点登录登出性能测试

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2018-12-21 10:55:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Action()
{

        web_set_max_html_param_len("1024");

/* Registering parameter(s) from source task id 5
        // {PeopleSoftJSessionID3} = "2085551FD67FAB001A2D7D7123117669"
        // */

        web_reg_save_param("PeopleSoftJSessionID3",
                "LB/IC=jsessionid=",
                "RB/IC=?",
                "Ord=1",
                "Search=Body",
                LAST);

        web_reg_save_param("sessionID",
                "LB=value",
                "RB=>",
                LAST);
        web_url("mh",
                "URL=http://127.0.0.1:8080/mh",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "URL=/cas/images/bbg.gif", "Referer=http://127.0.0.1:8080/cas/login?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F", ENDITEM,
                LAST);

        lr_rendezvous("登录集合点");

        lr_think_time(5);

        web_submit_data("verify.jsp",
                "Action=http://127.0.0.1:8080/cas/verify.jsp",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:8080/cas/login?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=type", "Value=CLIENT-JDBC", ENDITEM,
                "Name=clientHello", "Value=fwzx", ENDITEM,
                LAST);

        web_submit_data("verify.jsp_2",
                "Action=http://127.0.0.1:8080/cas/verify.jsp",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:8080/cas/login?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=type", "Value=CLIENT-HELLO", ENDITEM,
                "Name=clientHello", "Value={sessionID}", ENDITEM,
                LAST);

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

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2018-12-21 10:55:35 | 只看该作者
        web_submit_data("verify.jsp_3",
                "Action=http://127.0.0.1:8080/cas/verify.jsp",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:8080/cas/login?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F",
                "Snapshot=t4.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=type", "Value=CLIENT-AUTHCODE", ENDITEM,
                "Name=clientAuthCode", "Value=41555448434C49454E54415554485F320300000000001400170000002000000047005B046ABC01BAF30400045F0008006A00E2070B1000000000E5070B100000000034008000A300D40040009201170000004600700426301B5C204D2EC13C52F708FAFA407F584205323045022073C5141B361EC254772C9094F3E7D9C5CBEA374585AE2FA0FF167C37CEDE43A802210093E06709FCE0046BDFFE06B81B3DB6C20DC223DBB1CF474F00D7C7A4A7D0F0AA30820457308203FCA003020102020803000000000004D1300C06082A811CCF5501837505003032310B300906035504061302434E3123302106035504030C1AE6A0B952534126534D325F53595354454D2056312E305F534D32301E170D3138313131363030303030305A170D3231313131363030303030305A3081A0310B300906035504061302434E312D302B060355040B0C24E4B8ADE59BBDE7A791E5ADA6E999A2E4BFA1E681AFE5B7A5E7A88BE7A094E7A9B6E689803120301E06092A864886F70D01090116117368656E74616F406969652E61632E636E3115301306035504140C0C3031302D3832353436313131310E300C06035504040C0578677373743119301706035504030C10E4BFA1E5B7A5E689802DE6B288E6B69B3059301306072A8648CE3D020106082A811CCF5501822D034200046FE81D76D551F2A2CE2EBBA0733C79B1AD7AD7CD2"
                "432CFA26B7343BB643C1215BA9245C7029C95C3AB0E65E4320705530C8D866D34811168C22EE3BA34791680A382028930820285301106096086480186F84201010404030205A0300E0603551D0F0101FF0404030206C0300C0603551D130101FF0402300030290603551D250422302006082B0601050507030206082B06010505070304060A2B060104018237140202301F0603551D23041830168014C82A28570FC4AAACC5568DCEF86A52013D646380301D0603551D0E041604141039F44C6982DAB0C94FA664F6FCC61D22DB768E302906092B0601040182371402041C1E1A0053006D00610072007400630061007200640055007300650072304406092A864886F70D01090F04373035300E06082A864886F70D030202020080300E06082A864886F70D030402020080300706052B0E030207300A06082A864886F70D0307307B0603551D1F047430723070A06EA06C866A6C6461703A2F2F6C6461702E656363612E636F6D2E636E3A3338392F636E3D63726C3033303030302C6F753D63726C30302C6F753D63726C2C633D636E3F63657274696669636174657265766F636174696F6E6C6973743F7375623F28636E3D63726C30333030303029303906082B06010505070101042D302B302906082B06010505073001861D687474703A2F2F6F6373702E656363612E636F6D2E636E3A383830302F3023060A2B060"
                "10401A94364050804150C1330332D313830333230303030323035353231393023060A2B06010401A94364050904150C1330332D313830333230303030323035353231393011060A2B06010401A94364020104030C0130301006052A560B070404070C057867737374302F06052A560B070504260C24E4B8ADE59BBDE7A791E5ADA6E999A2E4BFA1E681AFE5B7A5E7A88BE7A094E7A9B6E68980301E06086086480186F8430904120C1030313030303130303030303030363833300C06082A811CCF5501837505000347003044022079826552B3F78D6B8F311253074737E21E7250A91E34B4501235AA9AFA4C7953022042C9FF0A85DCCF2EB86FD41189AA4D07EF81F433B7964FE02B1F587BBE8C6D7A10534944580A0A061E5C1B3026000069D8", ENDITEM,
                "Name=serverRandom", "Value=00005631c3ad08f70505bf80a7bdfacd", ENDITEM,
                LAST);

        web_submit_data("login;jsessionid=2085551FD67FAB001A2D7D7123117669",
                "Action=http://127.0.0.1:8080/cas/login;jsessionid={PeopleSoftJSessionID3}?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:8080/cas/login?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F",
                "Snapshot=t5.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=username", "Value=fwzx", ENDITEM,
                "Name=password", "Value=000000", ENDITEM,
                "Name=pin", "Value=88888888", ENDITEM,
                "Name=lt", "Value=LT-560-BKQtdwcTZ7vkb1USttTIw7xYgAcEZe", ENDITEM,
                "Name=execution", "Value=e1s1", ENDITEM,
                "Name=_eventId", "Value=submit", ENDITEM,
                EXTRARES,
                "URL=../mh/templets/1/company/images/pao1.swf", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/you.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/zuo.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/pao2.swf", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/xgsbg1.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/newsbg.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/home-vedio-1.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/home-load-1.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/home-outside-1.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/home-problem-1.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/home-store-1.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/icon-left.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/home-exchange-1.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/icon-right.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/feet22.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/footer-link.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/footer-aboutus.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/footer-tel.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                "URL=../mh/templets/1/company/images/footer-position.png", "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F", ENDITEM,
                LAST);

        web_custom_request("getPermissions.do",
                "URL=http://127.0.0.1:8080/mh/impl/getPermissions.do",
                "Method=POST",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F",
                "Snapshot=t6.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("checkForRegist.do",
                "URL=http://127.0.0.1:8080/mh/impl/checkForRegist.do",
                "Method=POST",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F",
                "Snapshot=t7.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("getPermissions.do_2",
                "URL=http://127.0.0.1:8080/mh/impl/getPermissions.do",
                "Method=POST",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F",
                "Snapshot=t8.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        lr_rendezvous("登录结束");

        web_url("login",
                "URL=http://127.0.0.1:8080/cas/login?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:8080/mh/;jsessionid=B02BA85170DD5E4887CB933B5A8ED09F",
                "Snapshot=t9.inf",
                "Mode=HTML",
                LAST);

        web_custom_request("getPermissions.do_3",
                "URL=http://127.0.0.1:8080/mh/impl/getPermissions.do",
                "Method=POST",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://127.0.0.1:8080/mh/",
                "Snapshot=t10.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("checkForRegist.do_2",
                "URL=http://127.0.0.1:8080/mh/impl/checkForRegist.do",
                "Method=POST",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://127.0.0.1:8080/mh/",
                "Snapshot=t11.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("getPermissions.do_4",
                "URL=http://127.0.0.1:8080/mh/impl/getPermissions.do",
                "Method=POST",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://127.0.0.1:8080/mh/",
                "Snapshot=t12.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        lr_think_time(4);

        web_url("logout",
                "URL=http://127.0.0.1:8080/cas/logout",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:8080/mh/",
                "Mode=HTML",
                LAST);

        web_add_cookie("CASTGC=TGT-7-tKNhVUEp3Oixr4mDcGsy21LyJY1bqxYPiaZfIE3aZDrmAdScUd-cas01.example.org; DOMAIN=127.0.0.1");

        web_url("login_2",
                "URL=http://127.0.0.1:8080/cas/login?service=http%3A%2F%2F127.0.0.1%3A8080%2Fmh%2F",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:8080/mh/",
                "Snapshot=t13.inf",
                "Mode=HTML",
                LAST);

return 0;
}
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-10 06:03 , Processed in 0.061957 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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