background image
<< Recovery System - Overriding the default recovery system | Recovery System - Modifying the default recovery system >>
Recovery System - Overriding the default processing
<< Recovery System - Overriding the default recovery system | Recovery System - Modifying the default recovery system >>
300
User's Guide
15 U
NDERSTANDING
THE
R
ECOVERY
S
YSTEM
Overriding the default recovery system
How the default
processing is
implemented
The default recovery system is implemented through several functions, as
described in the following table.
Overriding the default
processing
You can write functions that override some of the default behavior of the
recovery system.
If ScriptEnter, ScriptExit, TestcaseEnter, or TestcaseExit are defined, SilkTest
will use them instead of the corresponding default function.
Example You might want to specify that certain test files get copied from a
server in preparation for running a script. You would specify such processing
in a function called ScriptEnter in your test frame.
Function
Purpose
DefaultBaseState
Restore the default base state, then call the application's
BaseState function, if defined.
DefaultScriptEnter
Executed when a script file is first accessed.
Default action: none.
DefaultScriptExit
Executed when a script file is exited.
Default action: Call the ExceptLog function if the script
had errors.
DefaultTestcaseEnter
Executed when a testcase is about to start.
Default action: Set the application state.
DefaultTestcaseExit
Executed when a testcase has ended.
Default action: Call the ExceptLog function if the script
had errors, then set the base state.
To override
Define the following
DefaultScriptEnter
ScriptEnter
DefaultScriptExit
ScriptExit
DefaultTestcaseEnter
TestcaseEnter
DefaultTestcaseExit
TestcaseExit