Alerts via HTTP, IM or Custom Applications

TestSmith alerts can be triggered in two different ways during a script run:
  1. explicitly, using a sendAlert command
  2. implicitly, when an error (ERR) occurs on any other command.
In both cases the alert type is set up using the alert parameter. An alert can be sent via an HTTP request, as a Yahoo! IM, or by using a custom application. For explicit alerts, the alert message sent will be specified by the alertmsg parameter, for implicit alerts the alert message will be a combination of the built in error message, and related script information. It is slightly different for each alert type; the details are given below.

The alert parameter has the following syntax:
  • alert=yim:{yahoo-id}
  • alert=url:{url}
  • alert={application_name%--params}
  • alert=popup
Details

  • alert=yim:{yahoo-id}
    Example: alert=yim:dolly_parton
    Send an alert to {yahoo-id} using "Yahoo! Instant Messenger". You can use this type of alert only if you are logged in to "Yahoo! Instant Messenger" (as a different identity to the specified {yahoo-id}). There should be no other "Yahoo! Instant Messenger" message windows open while the script is running.
    The implicit alert message sent to {yahoo-id} consists of the script name, the command, the command line number and the message from the command's ERR result. The explicit alert message is specified by the alertmsg parameter.

  • alert=url:{url}
    Example:alert=url:http://www.mydomain.com/abc?id=myself&message={_ERRMSG_}
    Send an http request. The URL can contain a set of GET parameters, which must include the value {_ERRMSG_} if the message from the command's ERR result is to be included, or the value {_ALERTMSG_} if the alertmsg value is to be included. Script name and command details are not send with this type of alert.

  • alert={application_name%--params}
    Example:alert=java%--MyEmailApp%--"{_ERRMSG_}"
    Launch a custom application from the Windows O/S. The command parameters must include the value {_ERRMSG_} if the message from the command's ERR result is to be included, or the value {_ALERTMSG_} if the alertmsg value is to be included. Script name and command details are not send with this type of alert.

  • alert=popup
    Example:alert=popup
    Display a Windows modal dialog on the screen with the alert message. The modal dialog will stop the playback until it is closed. This type of alert is only useful for debugging purposes.
    The implicit alert message displayed consists of the script name, the command, the command line number and the message from the command's ERR result. The explicit alert message is specified by the alertmsg parameter.

For implicit alerts an information (INF) line will be output to the script specifying whether or not the alert was successfully sent. Explicit alerts will result in an error (ERR) if the alert was not successfully sent.