--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at http://groups.google.com/group/LR-LoadRunner.
For more options, visit https://groups.google.com/d/optout.
Hi Rick
Below code snippet may help you to log and review the test data used in web call to investigate further-
Define int i ; ( somewhere may be in globals.h)
//Whichever web call to the server you think may result in 5xx error or any server side error, for that web call check the return code. web_url, web_submit_data //returns LR_PASS (0) on success, and LR_FAIL (1) on failure.
lr_continue_on_error (0);
i= web_url(" ....someurl...."); //in case if you encounter an error the web call return value as 1 ( tested with 404 error)
lr_continue_on_error(1);
if (i){
lr_error_message("HTML error {errorcodesomehowobtained} was triggered. User is {UserID}, value #1 is {Value1}, value #2 is {Value2}";
i=0;
return 1;
}
//Also if you are particularly interested to know the HTTP status code you can take use web_get_int_property(HTTP_INFO_RETURN_CODE) function;
//E.g.
int i, HttpRetCode;
i=web_url("my_home",
"URL=http://my_home",
"TargetFrame=_TOP",
LAST );
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE)
If(i){
lr_output_message(“HTML error %d UserID1 %s , UserID2 %s", HttpRetCode,{Value1},{Value1});
//lr_error_message("HTML error {errorcodesomehowobtained} was triggered. User is {UserID}, value #1 is {Value1}, value #2 is {Value2}";
i=0;
//Error handler specific to the 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 ");
}
return 1;
}
Regards
Thunbs up on the status check…
“….HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE)….”