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 test, 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.
- 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.
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.
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.