| MC API | Subsystem list | Top level | Detailed Status |
Note: if you are writing one script that tests more than one application (for example, the PRODUCT and the EDL Manager), then read this.
This subsystem, the Recovery Framework, provides a framework for supporting application-specific recovery systems. It also allows testing more than one application simultaneously, each with its own recovery system.
In general terms, a recovery system should do the following:
ScriptEnter() is called at the beginning of each test script.
ScriptExit() is called at the end of each test script.
TestCaseEnter() is called at the beginning of each testcase.
TestCaseExit() is called at the end of each testcase.
Each of these functions essentially does one thing:
it calls a method of the same name in your application's MainWin.
For example, when testing the PRODUCT,
ScriptEnter calls gwMCmainWin.ScriptEnter.
You can tell the recovery system which application(s) to launch
automatically by defining and initializing the variable
gleRECapplications to be a list of
RECapplication. You must do this in your script (.t) file.
For example:
list of RECapplication gleRECapplications = { eREC_APP_MEDIA_COMPOSER };
The data type RECapplication is an enum whose
values define the applications that the recovery system knows about:
eREC_APP_MEDIA_COMPOSER
eREC_APP_EDL_MANAGER
Here's how this magic works:
ScriptEnter checks to see if the variable gleRECapplications
is defined. (It will be only defined if you explicitly define it in your script.)
If this variable is defined,
ScriptEnter uses its value(s) to initialize the list of
applications that will participate in the recovery system process.
If gleRECapplications is not defined,
ScriptEnter checks to see if the main windows are defined
for each application that it knows about (see list above).
For each main window that is defined
(for example, gwMCmainWin for the PRODUCT),
ScriptEnter adds that application to the list of applications
that will participate in the recovery system process.
These windows will be defined if you include ("use") the appropriate
.inc files in your script (for example, MCmainWin.inc for the PRODUCT).
If you don't use it, it won't be defined, and the recovery system will ignore it.
void
| ScriptEnter
| ()
|
void
| ScriptExit
| (boolean bException)
|
void
| TestCaseEnter
| ()
|
void
| TestCaseExit
| (boolean bException)
|
void
| RECaddApplication
| (window wMainWin)
|
void
| RECremoveApplication
| (window wMainWin)
|
void
| RECstubTestcase
| (string sExplanation)
|
void
| RECstubNextTestcase
| (string sExplanation)
|
boolean
| RECgetBooleanParam
| (string sParamName, out boolean bValue)
|
boolean
| RECgetIntegerParam
| (string sParamName, out integer iValue)
|
boolean
| RECgetListParam
| (string sParamName, out list of anytype laValue)
|
boolean
| RECgetRealParam
| (string sParamName, out real rValue)
|
boolean
| RECgetStringParam
| (string sParamName, out string sValue)
|
void
| RECgetAnyParam
| (string sName, inout ANYTYPE aVal)
|
void
| RECprintParamList
| (string sRECprintParamBoolean optional)
|
void
| RECdeleteParamList
| () |
main is called.
void ScriptEnter (void);
main is called.
It is called regardless of whether an exception terminated the script.
The recovery framework takes care of logging exceptions to
the results file; your method should not do this.
void ScriptExit (boolean bException);
bException
void TestCaseEnter (void);
void TestCaseExit (boolean bException);
bExceptionvoid RECaddApplication (window wMainWin);
wMainWinRECaddApplication is called
(i.e. the application does not have to be running yet).void RECremoveApplication (window wMainWin);
wMainWinRECstubNextTestcase instead.This routine raises an exception, which results in the testcase failing, without executing the rest of the testcase.
void RECstubTestcase (string sExplanation);
sExplanationRECstubTestcase instead.
void RECstubNextTestcase (string sExplanation);
sExplanation
gwMCmainWin)
returns the value of the named script parameter.
If the parameter exists and has a value which is not a boolean,
an exception is raised.
boolean RECgetBooleanParam (string sParamName, out boolean bValue);
sParamNameReturnsbValuegwMCmainWin)
returns the value of the named script parameter.
If the parameter exists and has a value which is not an integer,
an exception is raised.
boolean RECgetIntegerParam (string sParamName, out integer iValue);
sParamNameReturnsiValuegwMCmainWin)
returns the value of the named script parameter.
If the parameter exists and has a value which is not a string,
an exception is raised.
boolean RECgetStringParam (string sParamName, out string sValue);
sParamNameReturnssValuegwMCmainWin)
returns the value of the named script parameter.
If the parameter exists and has a value which is not a real,
an exception is raised.
boolean RECgetRealParam (string sParamName, out real rValue);
sParamNameReturnsrValuegwMCmainWin)
returns the value of the named script parameter.
If the parameter exists and has a value which is not a list or record,
an exception is raised.
boolean RECgetListParam (string sParamName, out list of anytype laValue);
sParamNameReturnslaValue
Each time it is called, RECgetAnyParam appends the parameter string to its private parameter list.
A subsequent call to RECprintParamList outputs the
list to the results file, in the form it requires in the parameter file. The script developer can
then copy these lines into the parameter file.
void RECgetAnyParam (string sName, inout ANYTYPE aVar);
sNameaVaraVarShared/RECgetAnyParam.inc - RECgetAnyParam, RECmakeParamList, RECprintParamList.
RECgetAnyParamRECgetAnyParam for each parameter. e.g. RECgetAnyParam( "MyVar", MyVar );
RECprintParamList;
integer iInt = 1234;
RECgetAnyParam("iInt", iInt);
string sString = "hello";
RECgetAnyParam("sString", sString);
list of real rReal = {12.34, 56.78, 90.12};
RECgetAnyParam("rReal", rReal);
RECprintParamList();
RECgetAnyParam.
It is designed to be controlled either by the default boolean parameter file variable "bRECprintParamList",
or by a custom parameter named in the optional string argument, which takes precedence. If either of these are found, the
printing takes place if the boolean is set TRUE. If neither variable is defined, the printing gets done
by default. See RECgetAnyParam for a script
parameterization procedure and example.)
void RECprintParamList (string sRECprintParamListBOOLEAN optional);
"bRECprintParamList"sRECprintParamListBOOLEAN
ReturnsPrints out to results fileRECgetAnyParam, in the correct
format to be read-in by RECgetAnyParam. (This is always a list
of string, or some compound form of a list of string.)RECgetAnyParam
will start a new list.
void RECdeleteParamList ();
Last updated 7 April 1998.