background image
<< Using LoadRunner Functions in GUI Vuser Scripts | The output_message function >>
<< Using LoadRunner Functions in GUI Vuser Scripts | The output_message function >>

Sending Messages to the Controller

GUI Vuser Scripts Developing GUI Vuser Scripts
Creating Vuser Scripts
Chapter 26, page 451
Sending Messages to the Controller
When you run a scenario, the Controller's Output window displays valuable
information about script execution. In addition to the messages automatically sent
by WinRunner and VXRunner, you can include statements in each script that send
error and notification messages to the Controller. For example, you could insert a
message that displays the current state of an application. After scenario execution,
you can save these messages to a file.
The error_message function sends an error message to the Controller's Output
window. The syntax of this function is:
error_message (
message
);
where
message
is a text string. In the following example, the Vuser script sends a
message when a fatal error occurs during script execution.
if ( fatal_error < 0 ){
mess = sprintf ( "fatal error - Exiting." );
error_message ( mess );
texit (1);
}