loadrunner测试文件下载问题
脚本:Action()
{
int returnCode;
float fFileDownloadSize, fFileDownloadTime, fFileDownloadRate;
lr_output_message("------------Test is Starting-------------");
web_url("xxxxxx.ocx",
"URL=http://www.xxxx.com/update/xxx/xxxxxx.ocx",
"Resource=1",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t4.inf",
LAST);
returnCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
lr_output_message("Return Code = %d",returnCode);
if(returnCode != 200)
return -1;
fFileDownloadSize = (web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE)/1024.); //in kilobytes
fFileDownloadTime = (web_get_int_property(HTTP_INFO_DOWNLOAD_TIME)/1000.); //in seconds
if(fFileDownloadTime > 0)
fFileDownloadRate = fFileDownloadSize/fFileDownloadTime; //in KB/s
lr_output_message("Size of download was %.0f kilobytes; Time of download was %.3f seconds", fFileDownloadSize, fFileDownloadTime);
lr_output_message("Rate of download was %.2f KB/sec", fFileDownloadRate);
return 0;
}
问题:
1、文件超过1M,只能下载到577K左右
2、测试的过程中怎么看lr_output_message输出 下载感觉没必要用LR来测
页:
[1]