免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項超值服

開通VIP
loadrunner支持https協(xié)議的操作方法

 

問題:用戶portal支持https協(xié)議,用loadrunner錄制登陸腳本時發(fā)現(xiàn)未錄制到用戶名和密碼

 

錄制到的腳本如下:

login()

{

 

        lr_think_time(10);

 

        web_url("verifycode.jsp",

                  "URL=https://192.168.211.246:56661/portal/common/jsp/verifycode.jsp?codeSource=loginverifycode&time=1330596177343",

                  "Resource=1",

                  "RecContentType=image/jpeg",

                  "Referer=https://192.168.211.246:56661/portal/indexAction",

                  "Snapshot=t2.inf",

                  LAST);

 

        web_url("192.168.211.246:38787_2",

                  "URL=http://192.168.211.246:38787/",

                  "Resource=0",

                  "RecContentType=text/html",

                  "Referer=https://192.168.211.246:56661/portal/indexAction",

                  "Snapshot=t3.inf",

                  "Mode=HTML",

                  EXTRARES,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/head/topbg_line.jpg", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/shadowLW.jpg", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/tabM.jpg", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/tabBg.jpg", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/shadowRW.jpg", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/titleHot.gif", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/head/contanta_pic_y.gif", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/titleHot2.gif", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/shadowB.jpg", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  "Url=https://192.168.211.246:56661/portal/common/style/image/titleMyoder.gif", "Referer=https://192.168.211.246:56661/portal/indexAction", ENDITEM,

                  LAST);

 

        web_url("subscribeInfoQuery.action",

                  "URL=https://192.168.211.246:56661/portal/subscribeInfoQuery.action",

                  "Resource=0",

                  "RecContentType=text/html",

                  "Referer=https://192.168.211.246:56661/portal/indexAction",

                  "Snapshot=t4.inf",

                  "Mode=HTML",

                  LAST);

 

        return 0;

}

 

 

思考:是否是loadrunner不支持https

 

解決:通過查找一些資料,其實loadrunner支持https協(xié)議,但需要在錄制腳本時做一些修改,操作步驟如下:

1、證書的準(zhǔn)備

常見的證書為:*.pfx格式,該種格式的證書可以通過雙擊運(yùn)行安裝到IE瀏覽器上。用戶在訪問的時候就可以使用到。

但這種證書并不是LoadRunner所使用的類型,因此需要對其進(jìn)行轉(zhuǎn)換。將其轉(zhuǎn)換為*.pem格式。

轉(zhuǎn)換方法如下:

a)        安裝openssl

b)        運(yùn)行C:\<OpenSSL>/bin文件夾的openssl二進(jìn)制文件,它將啟動OpenSSL命令提示符

c)        執(zhí)行以下命令:pkcs12 -in D:\test1.pfx -out D:\test01.pemnodes

d)        執(zhí)行后,將會在指定目錄生成test01.pem文件,這個文件將會在下一個步驟,對LoadRunner進(jìn)行配置的時候使用到。

 

2LR配置

啟動LoadRunner,打開Recording Option選項。

[圖片]

留意紅色框中的選項。

選擇后,單擊New Enty

[圖片]

紅框中的配置為服務(wù)器的ip和端口號,按照測試所需要的實際地址進(jìn)行配置就可以

配置后,將Use specified client-side certificate[Base64/PEM]鉤選,為使用客戶端證書訪問。

單擊...選擇剛剛轉(zhuǎn)換生成的客戶端證書。

[圖片]

如果你為證書有設(shè)置密碼,在這里也需要輸入。

到此為止所有與http區(qū)別的配置就完成了。

錄制后,可以在腳本的開始,看到LoadRunner新生成的語句

web_set_certificate_ex("

CertFilePath=test01.pem",   //密鑰文件

               "CertFormat=PEM",

               "KeyFilePath=test01.pem",   //密鑰文件

               "KeyFormat=PEM",         

               "Password=123456",        //密鑰密碼

               "CertIndex=1",

               LAST);

 

3、完成上面兩步后可以正常錄制腳本

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
一道Loadrunner筆試題
Loadrunner思考時間
LoadRunner腳本解釋分析
LR 事務(wù)+集合點+參數(shù)化+檢查點
lr文件下載腳本
LoadRunner 技巧之 自動關(guān)聯(lián)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服