notifyCheckFailure()

Report a check failure.

Syntax

notifyCheckFailure( message STRING ) 
  1. message is the failure message to register.

Usage

You can use it to notify the scenario user of a check failure. If you write a check and expect a failure to be recorded and reported at the end, call this function when your check fails. The failure will be reported with file and line number information. At the end of the scenario all failures will be listed, formatted as:
filename:lineno:error:message
For example:
/home/f4gl/app/myapp.4gl:82:error:(GGC-2) The action 'hello' is not found.
Failed checks generate error numbers. GGC error numbers (for example GGC-2), are displayed in a way that makes them clickable in Genero Studio so the file and line where the error occurred can be found. For this reason, you need to provide error numbers for the check failures you report. Calling this function does not stop the scenario. For example:
DEFINE msg ggc.Message

CALL ggc.getMessage() RETURNING msg.*
DISPLAY msg.message

IF msg.message != "User successfully created." THEN
  CALL ggc.notifyCheckFailure("(GGC-2) Expected 'User successfully created.', got: '" || msg.message || "'")
END IF