`

是如何利用LoadRunner判断HTTP服务器的返回状态.

阅读更多
第一种方法是利用LR的内置函数web_get_int_property, 如下是一个简单的例子:
Action.c
{
int HttpRetCode;
web_url(”my_home”, “URL=http://my_home”, “TargetFrame=_TOP”, LAST);
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
if (HttpRetCode == 200)
lr_log_message(”The script. successfully accessed the My_home home page”);
else
lr_log_message(”The script. failed to access the My_home home page “);
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics