我尝试使用此功能
捕获页面加载时间Action() {
long PageLoadTime;
lr_start_transaction("1st Load Test");
web_url("user_guide","URL=https://www.amazon.in/","Mode=HTML",LAST );
pageLoadTime=web_get_int_property(HTTP_INFO_DOWNLOAD_TIME);
lr_output_message("----PageLoadTime of URL----: [%s]", lr_eval_string("
{pageLoadTime}"));
lr_end_transaction("1st Load Test", LR_AUTO);
return 0;
}
答案 0 :(得分:1)
我修复了你的代码:
Action() {
int pageLoadTime;
lr_start_transaction("1st Load Test");
web_url("user_guide","URL=https://www.amazon.in/","Mode=HTML",LAST );
pageLoadTime=web_get_int_property(HTTP_INFO_DOWNLOAD_TIME);
lr_output_message("----PageLoadTime of URL----: [%d]", pageLoadTime);
lr_end_transaction("1st Load Test", LR_AUTO);
return 0;
}
答案 1 :(得分:-1)
请参阅lr_get_transaction_duration(),lr_get_transaction_status()和lr_get_transaction_wasted_time()