loadrunner結(jié)果分析與關(guān)聯(lián)分析
1. 錄制
Runtime Settings
proxy
Internet protocol
download filters
record
general→recording→html-based script→a script containing explicit urls only
http properties→advanced→support charset→utf8
2. 回放
initialize all vusers simultaneously 同時(shí)初始化所有vuser 快
initialize each vuser just before it runs 運(yùn)行時(shí)初始化各個(gè)vuser 慢
Download non-HTML resources 去掉圖片下載
winlnet replay instead of sockets 解決超時(shí)
3. 結(jié)果分析
Running Vusers
Displays the number of Vusers that executed Vuser scripts, and their status, during each second of a load test. This graph is useful for determining the Vuser load on your server at any given moment.
并發(fā)用戶數(shù)
顯示在負(fù)載測(cè)試的每一秒期間執(zhí)行Vuser腳本的Vuser數(shù)及其狀態(tài)。 此圖對(duì)于在任何給定時(shí)刻確定服務(wù)器上的Vuser負(fù)載非常有用。
Hits per Second
Displays the number of hits made on the Web server by Vusers during each second of the load test. This graph helps you evaluate the amount of load Vusers generate, in terms of the number of hits.
每秒點(diǎn)擊數(shù)
顯示Vuser在每次負(fù)載測(cè)試期間在Web服務(wù)器上執(zhí)行的命中數(shù)。 此圖表可幫助您根據(jù)命中數(shù)評(píng)估Vuser生成的負(fù)載量。
Throughput
Displays the amount of throughput (in bytes) on the Web server during the load test. Throughput represents the amount of data that the Vusers received from the server at any given second. This graph helps you to evaluate the amount of load Vusers generate, in terms of server throughput.
吞吐量
顯示負(fù)載測(cè)試期間Web服務(wù)器上的吞吐量(以字節(jié)為單位)。 吞吐量表示Vuser在任何給定秒鐘從服務(wù)器接收的數(shù)據(jù)量。 此圖可幫助您根據(jù)服務(wù)器吞吐量評(píng)估Vuser生成的負(fù)載量。
Transaction Summary
Displays the number of transactions that passed, failed, stopped, or ended with errors.
事務(wù)總數(shù)
顯示通過(guò),失敗,停止或以錯(cuò)誤結(jié)束的事務(wù)數(shù)。
Average Transaction Response Time
Displays the average time taken to perform transactions during each second of the load test. This graph helps you determine whether the performance of the server is within acceptable minimum and maximum transaction performance time ranges defined for your system.
平均事務(wù)響應(yīng)時(shí)間
顯示在負(fù)載測(cè)試的每一秒期間執(zhí)行事務(wù)所花費(fèi)的平均時(shí)間。 此圖可幫助您確定服務(wù)器的性能是否在為系統(tǒng)定義的可接受的最小和最大事務(wù)性能時(shí)間范圍內(nèi)。
Transactions per Second
Displays the number of completed transactions (both successful and unsuccessful) performed during each second of a load test. This graph helps you determine the actual transaction load on your system at any given moment.
每秒事務(wù)數(shù)
顯示在負(fù)載測(cè)試的每一秒期間執(zhí)行的已完成事務(wù)(包括成功和不成功)的數(shù)量。 此圖可幫助您確定系統(tǒng)在任何給定時(shí)刻的實(shí)際事務(wù)負(fù)載。
4. 關(guān)聯(lián)分析
overlay tile correlate
覆蓋 平鋪 關(guān)聯(lián)
并發(fā)用戶數(shù)、平均事務(wù)響應(yīng)時(shí)間關(guān)聯(lián)分析
并發(fā)用戶數(shù)、吞吐量關(guān)聯(lián)分析
每秒點(diǎn)擊數(shù)、并發(fā)用戶數(shù)合并分析
每秒點(diǎn)擊數(shù)、吞吐量合并分析
Action()
{
web_reg_save_param("test",? ? ? ? //關(guān)聯(lián)函數(shù)
"LB=,",
"RB=,",
"Ord=1",
"Search=NoResource",
LAST);
web_custom_request("login",
? ? "URL=http://api.wuye.wisq.cn/login?",
? ? "Method=POST",
? ? "Resource=0",
? ? "RecContentType=application/json",
? ? "Referer=",
? ? "Mode=HTTP",
? ? "EncType={contype};charset=UTF-8",
"Body={\"phone\":\"17152716641\",\"password\":\"123123\"}",
? ? LAST);
lr_output_message(lr_eval_string("{test}"));
if(strcmp(lr_eval_string("{test}"),"msg")==0)
lr_output_message("斷言成功");
else
lr_output_message("斷言失敗");
return 0;
}