Recovery
System
       
Subsystem
list
       
Top
level


The RECquitOnError Class

This recovery class terminates execution of the script if an error occurs. This is useful for workflow tests in which each testcase depends on the successful execution of the previous testcases.

Overridden Methods

boolean IsHappy (RECphase ePhase, boolean logFirstFailure)
boolean BeHappy (RECphase ePhase)


IsHappy

Returns TRUE if the number of errors for the current testcase is zero. If the current recovery phase is ScriptEnter or ScriptExit, this method always returns TRUE. For more information, see RECbase.IsHappy.


BeHappy

If the current recovery phase is TestcaseEnter or TestcaseExit, and the number of errors for the testcase is greater than zero, then the script is terminated (ScriptExit is run). For more information, see RECbase.BeHappy.


Implementation

For use during design; to be removed from final doc.

winclass RECquitOnError : RECbase
{
    boolean IsHappy (RECphase ePhase, boolean logFirstFailure)
    {
        if (ePhase == eREC_SCRIPT_ENTER || ePhase == eREC_SCRIPT_EXIT)
            return TRUE;
        return GetTestCaseErrorCount() == 0;
    }

    boolean BeHappy (RECphase ePhase)
    {
        if (ePhase == eREC_TESTCASE_ENTER || ePhase == eREC_TESTCASE_EXIT)
            if (GetTestCaseErrorCount() > 0)
                raise 1, "script execution terminated by RECquitOnError");
        return TRUE;
    }
}



This page is maintained by (REMOVED).
Last updated 15 September 1998.