Scenario failures and check failures

How the GGC handles a failure during testing depends on whether the failure is a scenario failure or a check failure.

A scenario failure stops the execution of the text, while a check failure logs the error but allows the test to continue executing. You can, however, specify that check failures be treated like scenario failures, and that test execution stops when a check failure occurs.

Types of test failures

By default, a failure is either a scenario failure or a check failure.

Scenario failure
A scenario failure occurs when an unrecoverable error occurs. An example of a scenario failure would be when an action was not active, and therefore should not have been called.
For example, a Genero BDL test scenario may include this line of code:
CALL ggc.action("accept")
If there is no active action named "accept", the GGC fails the scenario because the action is not found. It stops the test and records the scenario failure to the test report, to include details of where the error occurred in the source.
Check failure
A check failure occurs when the GGC identifies an unexpected value or setting, such as when an expected value does not match the actual value.
For example, a Genero BDL test scenario may include this line of code:
CALL ggc.checkFieldValue("formonly.name", "Wall clock")
This function expects the field to contain the value "Wall clock". If the field value is not "Wall clock", the GGC does not fail the scenario; however, it records a check failure to the test report.
Note: All check failures are the result of a call to notifyCheckFailure(). The GGC API functions that start with check notify check failures.

Check-as-failure: handle a check failure like a scenario failure

You can have the GGC handle a check failure as a scenario failure by including the --check-as-failure option in the Java or BDL command that runs the test scenario.

In this example, the option is added to the command that runs a Java test scenario against an application running on the GAS:
ggcadmin ua --check-as-failure --url https://myserver:6394/ua/r/price --scenario myscenario
In this example, the option is added to the command that runs a Genero BDL test scenario against an application running on the GAS:
fglrun myscenario ua --check-as-failure --url https://myserver:6394/ua/r/price

With either example, the GGC fails the scenario when a check failure occurs. It stops the test and writes an error message to the test report.