4)兩種腳本的內容比較:
* http腳本直觀(guān),易于理解和維護
* url 內容多,可伸縮性強,記錄了更詳細的用戶(hù)操作信息。
2,HTML 高級選項:
1) 默認是選擇描述用戶(hù)行為的腳本
2) 僅包含明確的URL腳本,錄制結果如下:
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("Update.htm",
"URL=http://scdown.qq.com/download/Update.htm",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_url("Update.htm_2",
"URL=http://scdown.qq.com/download/Update.htm",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
web_url("Update.htm_3",
"URL=http://scdown.qq.com/download/Update.htm",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=97276.9197245848fAADziVpffiDDDDDDAAccpAiQDf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=52", ENDITEM,
"Name=login.y", "Value=8", ENDITEM,
LAST);
return 0;
}
3,錄制header
默認設置是不錄制,選擇需要錄制的Headers,以便服務(wù)器能夠正確處理編碼信息。需要注意的是“accept-language”,像websphere這類(lèi)服務(wù)器會(huì )根據HTTP 請求中的Header來(lái)確定編碼。
文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/