Example: lr.error_message
In the this example, there is a parameter, <iteration> that reports the iteration number of the test. The lr.error_message function sends a message indicating the current iteration number.
public int login(string username, string password) { //emulate failed login return lr.FAIL; } int status = login("username","password");
if (status == lr.FAIL) { lr.error_message( "Error at iteration #" + lr.eval_string( "{iteration}" ) ); return -1; } return 0;