Quantcast
Viewing all articles
Browse latest Browse all 12134

Re: Can LR be programmed to stop when a web site goes down

You can use below logic to stop your test while getting HTTP 500 error:

 

int HttpRetCode;

 

lr_start_transaction("My_Trans");

 

web_url("my_home",

    "URL=http://my_home",

    "TargetFrame=_TOP",

    LAST );

HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);

if (HttpRetCode == 500)

{

    lr_end_transaction("My_Trans", LR_FAIL );

    vuser_end();

}

    else

    lr_end_transaction("My_Trans", LR_PASS);

 

 

 


Viewing all articles
Browse latest Browse all 12134

Trending Articles