- 模擬10000個(gè)用戶(hù)
- 查看服務(wù)器負(fù)載 (top load everage 、uptime)
任意一條數(shù)據(jù)/cpu個(gè)數(shù) > 5 超負(fù)荷,需要調(diào)優(yōu)
LoaderRunner 填寫(xiě)提交的數(shù)據(jù)
insert --> new step --> submitData

添加data

查看抓取結(jié)果

查看登錄前使用的鏈接
Action()
{
// web_url("openMain","URL=http://localhost:1080/webtours/",LAST);
// 請(qǐng)求登錄前參數(shù)
web_reg_save_param("session",
"LB= name=userSession value=",
"RB=>",
"Ord=1",
LAST);
// 自定義函數(shù)
web_custom_request("customerOpen",
"URL=http://localhost:1080/webtours/",
"Method=GET",
"TargetFrame=",
"Resource=0",
"Referer=",
"Mode=HTML",
"Body=",
LAST);
// 登錄請(qǐng)求
web_submit_data("web_submit_data",
"Action=http://localhost:1080/webtours/login.pl",
"Method=POST",
"TargetFrame=",
"Referer=",
ITEMDATA,
"Name=userSession", "Value={session}", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=login.x", "Value=-17", ENDITEM,
"Name=login.y", "Value=-179", ENDITEM,
"Name=login", "Value=Login", ENDITEM,
"Name=JSPFormSubmi", "Value=off", ENDITEM,
LAST);
return 0;
}

參數(shù)化運(yùn)行
變量定義必須放在首行
參數(shù)定義可以在任意位置

web查找函數(shù)特點(diǎn)

思考時(shí)間

設(shè)置思考時(shí)間

常用api匯總
要求: 事務(wù)平均響應(yīng)時(shí)間是 0.005s
1/0.005 = 200
十個(gè)用戶(hù) 2000

Paste_Image.png