LoadRunner中HTTP協(xié)議的錄制及模式_第1頁(yè)
LoadRunner中HTTP協(xié)議的錄制及模式_第2頁(yè)
LoadRunner中HTTP協(xié)議的錄制及模式_第3頁(yè)
LoadRunner中HTTP協(xié)議的錄制及模式_第4頁(yè)
LoadRunner中HTTP協(xié)議的錄制及模式_第5頁(yè)
已閱讀5頁(yè),還剩7頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

第第頁(yè)LoadRunner中HTTP協(xié)議的錄制及模式LoadRunner中HTTP協(xié)議的錄制及模式

發(fā)表于:2023-05-15來(lái)源::點(diǎn)擊數(shù):標(biāo)簽:loadRunnerLoadrunnerLoadRunnerloadrunnerhttp

LoadRunner中HTTP協(xié)議的錄制及兩種錄制模式的比較一,腳本編寫(xiě)1,“HTML–basescrīpt”和“URL-basescrīpt”的區(qū)別1)“HTML–basescrīpt”默認(rèn)模式,為每個(gè)用戶請(qǐng)求生成單獨(dú)的函數(shù)如:Action(){web_url("WebTours","URL=

LoadRunner中HTTP協(xié)議的錄制及兩種錄制模式的比較

一,腳本編寫(xiě)

1,“HTML–basescrīpt”和“URL-basescrīpt”的區(qū)別

1)“HTML–basescrīpt”默認(rèn)模式,為每個(gè)用戶請(qǐng)求生成單獨(dú)的函數(shù)

如:

Action()

{

web_url("WebTours",

"URL=:1080/WebTours/",

"Resource=0",

"RecContentType=text/html",

"Referer=",

"Snapshot=t4.inf",

"Mode=HTML",

LAST);

web_submit_form("login.pl",

"Snapshot=t5.inf",

ITEMDATA,

"Name=username","Value=jojo",ENDITEM,

"Name=password","Value=bean",ENDITEM,

"Name=login.x","Value=53",ENDITEM,

"Name=login.y","Value=13",ENDITEM,

LAST);

return0;

}

2)“URL-basescrīpt”可以捕獲所有作為用戶操作的結(jié)果發(fā)送到服務(wù)器的HTTP請(qǐng)求,然后一一記錄下來(lái)。可以捕獲非HTML應(yīng)用程序,例如小程序和非瀏覽器應(yīng)用程序。

如:

Action()

{

web_url("WebTours",

"URL=:1080/WebTours/",

"Resource=0",

"RecContentType=text/html",

"Referer=",

"Snapshot=t1.inf",

"Mode=HTTP",

LAST);

web_concurrent_start(NULL);

web_url("header.html",

"URL=:1080/WebTours/header.html",

"Resource=0",

"RecContentType=text/html",

"Referer=:1080/WebTours/",

"Snapshot=t2.inf",

"Mode=HTTP",

LAST);

web_url("welcome.pl",

"URL=:1080/WebTours/welcome.pl?signOff=true",

"Resource=0",

"RecContentType=text/html",

"Referer=:1080/WebTours/",

"Snapshot=t5.inf",

"Mode=HTTP",

LAST);

web_concurrent_end(NULL);

web_concurrent_start(NULL);

web_url("hp_logo.png",

"URL=:1080/WebTours/images/hp_logo.png",

"Resource=1",

"RecContentType=image/png",

"Referer=:1080/WebTours/header.html",

"Snapshot=t3.inf",

LAST);

web_url("webtours.png",

"URL=:1080/WebTours/images/webtours.png",

"Resource=1",

"RecContentType=image/png",

"Referer=:1080/WebTours/header.html",

"Snapshot=t4.inf",

LAST);

web_concurrent_end(NULL);

web_concurrent_start(NULL);

web_url("home.html",

"URL=:1080/WebTours/home.html",

"Resource=0",

"RecContentType=text/html",

"Referer=:1080/WebTours/welcome.pl?signOff=true",

"Snapshot=t6.inf",

"Mode=HTTP",

LAST);

web_url("nav.pl",

"URL=:1080/WebTours/nav.pl?in=home",

"Resource=0",

"RecContentType=text/html",

"Referer=:1080/WebTours/welcome.pl?signOff=true",

"Snapshot=t7.inf",

"Mode=HTTP",

LAST);

web_concurrent_end(NULL);

web_url("mer_login.gif",

"URL=:1080/WebTours/images/mer_login.gif",

"Resource=1",

"RecContentType=image/gif",

"Referer=:1080/WebTours/nav.pl?in=home",

"Snapshot=t8.inf",

LAST);

web_submit_data("login.pl",

"Action=:1080/WebTours/login.pl",

"Method=POST",

"RecContentType=text/html",

"Referer=:1080/WebTours/nav.pl?in=home",

"Snapshot=t9.inf",

"Mode=HTTP",

ITEMDATA,

"Name=userSession","Value=97276.8320777643fAADzHHpAfDAAclearcase/"target="_blank">ccpAzcD",ENDITEM,

"Name=username","Value=jojo",ENDITEM,

"Name=password","Value=bean",ENDITEM,

"Name=JSFormSubmit","Value=off",ENDITEM,

"Name=login.x","Value=56",ENDITEM,

"Name=login.y","Value=11",ENDITEM,

LAST);

web_concurrent_start(NULL);

web_url("login.pl_2",

"URL=:1080/WebTours/login.pl?intro=true",

"Resource=0",

"RecContentType=text/html",

"Referer=:1080/WebTours/login.pl",

"Snapshot=t10.inf",

"Mode=HTTP",

LAST);

web_url("nav.pl_2",

"URL=:1080/WebTours/nav.pl?page=menuin=home",

"Resource=0",

"RecContentType=text/html",

"Referer=:1080/WebTours/login.pl",

"Snapshot=t11.inf",

"Mode=HTTP",

LAST);

web_concurrent_end(NULL);

web_concurrent_start(NULL);

web_url("in_home.gif",

"URL=:1080/WebTours/images/in_home.gif",

"Resource=1",

"RecContentType=image/gif",

"Referer=:1080/WebTours/nav.pl?page=menuin=home",

"Snapshot=t12.inf",

LAST);

web_url("flights.gif",

"URL=:1080/WebTours/images/flights.gif",

"Resource=1",

"RecContentType=image/gif",

"Referer=:1080/WebTours/nav.pl?page=menuin=home",

"Snapshot=t13.inf",

LAST);

web_url("signoff.gif",

"URL=:1080/WebTours/images/signoff.gif",

"Resource=1",

"RecContentType=image/gif",

"Referer=:1080/WebTours/nav.pl?page=menuin=home",

"Snapshot=t14.inf",

LAST);

web_url("itinerary.gif",

"URL=:1080/WebTours/images/itinerary.gif",

"Resource=1",

"RecContentType=image/gif",

"Referer=:1080/WebTours/nav.pl?page=menuin=home",

"Snapshot=t15.inf",

LAST);

web_concurrent_end(NULL);

return0;

}

3)如何選擇?什么時(shí)候選擇url的錄制方式:

*不是基于瀏覽器的

*基于瀏覽器但是包含javascrīpt,并且發(fā)送了請(qǐng)求到服務(wù)器

*使用了https安全協(xié)議

4)兩種腳本的內(nèi)容比較:

*http腳本直觀,易于理解和維護(hù)

*url內(nèi)容多,可伸縮性強(qiáng),記錄了更詳細(xì)的用戶操作信息。

2,HTML高級(jí)選項(xiàng):

1)默認(rèn)是選擇描述用戶行為的腳本

2)僅包含明確的URL腳本,錄制結(jié)果如下:

Action()

{

web_url("WebTours",

"URL=:1080/WebTours/",

"TargetFrame=",

"Resource=0",

"RecContentType=text/html",

"Referer=",

"Snapshot=t1.inf",

"Mode=HTML",

LAST);

web_url("Update.htm",

"URL=/download/Update.htm",

"TargetFrame=",

"Resource=0",

"RecContentType=text/html",

"Referer=",

"Snapshot=t2.inf",

"Mode=HTML",

LAST);

web_url("Update.htm_2",

"URL=/download/Update.htm",

"TargetFrame=",

"Resource=0",

"RecContentType=text/html",

"Referer=",

"Snapshot=t3.inf",

"Mode=HTML",

LAST);

web_url("Update.htm_3",

"URL=/download/Update.htm",

"TargetFrame=",

"Resource=0",

"RecContentType=text/html",

"Referer=",

"Snapshot=t4.inf",

"Mode=HTML",

LAST);

web_submit_data("login.pl",

"Act

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論