如何利用LoadRunner判断HTTP服务器的返回状态[原]

上一篇 / 下一篇  2009-01-28 12:19:04 / 个人分类:性能测试


可以利用LR的内置函数web_get_int_property判断HTTP服务器的返回状态, 如下是一个简单的例子:
#include "web_api.h"

Action()
{
int HttpRetCode;
web_url("my_home","URL=http://myhomeurl","TargetFrame=_TOP", LAST);
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);

if (HttpRetCode == 200)
 lr_log_message("The scrīpt successfully accessed the My_home home page");
else
 lr_log_message("The scrīpt failed to access the My_home home page ");

 return 0;
}


TAG: 性能测试

 

评分:0

我来说两句

日历

« 2024-05-01  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 10718
  • 日志数: 19
  • 建立时间: 2008-12-20
  • 更新时间: 2009-01-29

RSS订阅

Open Toolbar