CTestScripter Class Reference

class CTestScripter : public CTestModuleBase

Inherits from

Public Member Functions
~CTestScripter ()
TInt CallTestClass (const TDesC &)
IMPORT_C TInt GetConstantValue (const TDesC &, TDes &)
IMPORT_C TInt GetLocalValue (const TDesC &, TDes &)
TInt GetTestCasesL (const TFileName &, RPointerArray < TTestCaseInfo > &)
TInt GetTestScriptObject (const TDesC &)
TInt InitL ( TFileName &, TBool )
CTestScripter * NewL ()
TInt RunTestCaseL (const TInt , const TFileName &, TTestResult &)
IMPORT_C TInt SetLocalValue (const TDesC &, const TDesC &)
IMPORT_C void SetResultDescription (const TDesC &)
CTestRunner & TestRunner ()
Private Member Functions
CTestScripter ()
void ConstructL ()
void CreateKernelObjectL ( TDesC &, TDesC &)
void CreateObjectL ( TDesC &, TDesC &)
TInt DeleteObjectL ( TDesC &)
TTestObjectBase * GetObject (const TDesC &)
CStifSectionParser * GetSubL (const TDesC &)
CStifSectionParser * GetTestCaseL ( TInt , const TFileName &)
TTestModule * LoadTestModuleL ( TDesC &)
void ReadInitializationL (const TDesC &, RPointerArray < CDefinedValue > &)
void RunTestL ()
void UpdateTestCaseResult (const TInt , const TDesC &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CTestModuleBase::CTestModuleBase()
CTestModuleBase::OOMHandleWarningL(const TFileName &,const ,TInt &)
CTestModuleBase::OOMTestFinalizeL(const TFileName &,const )
CTestModuleBase::OOMTestInitializeL(const TFileName &,const )
CTestModuleBase::OOMTestQueryL(const TFileName &,const ,TOOMFailureType &,TInt &,TInt &)
CTestModuleBase::TestModuleIf()
CTestModuleBase::Version()
CTestModuleBase::~CTestModuleBase()
Inherited Enumerations
CTestModuleBase:TOOMFailureType
Public Attributes
CStifLogger * iLog
Private Attributes
TBool iAddTestCaseTitleToLogName
TBool iCheckHeapBalance
TFileName iConfig
CStifSectionParser * iCurrentParser
TBool iCurrentParserReadFirstLine
RPointerArray < CDefinedValue > iDefinedIni
RPointerArray < CDefinedValue > iDefinedLocal
RPointerArray < CDefinedValue > iDefinedRuntime
TBool iOOMIgnoreFailure
RPointerArray < CStifSectionParser > iParserStack
TTestResult iResult
CStifSectionParser * iSectionParser
CStifLogger * iStdLog
CStifLogger * iTCLog
RPointerArray < TTestModule > iTestModules
RPointerArray < TTestObjectBase > iTestObjects
CTestRunner * iTestRunner

Constructor & Destructor Documentation

CTestScripter()

CTestScripter ( ) [private]

C++ default constructor.

~CTestScripter()

~CTestScripter ( )

Destructor.

Member Functions Documentation

CallTestClass(const TDesC &)

TInt CallTestClass ( const TDesC & aLine )

Call specified tst class object.

Parameters

const TDesC & aLine

ConstructL()

void ConstructL ( ) [private]

By default Symbian OS constructor is private.

CreateKernelObjectL(TDesC &, TDesC &)

void CreateKernelObjectL ( TDesC & aDriver,
TDesC & aObjectId
) [private]

CreateKernelObjectL create new kernel object.

Parameters

TDesC & aDriver
TDesC & aObjectId

CreateObjectL(TDesC &, TDesC &)

void CreateObjectL ( TDesC & aModule,
TDesC & aObjectId
) [private]

CreateObjectL create new object.

Parameters

TDesC & aModule
TDesC & aObjectId

DeleteObjectL(TDesC &)

TInt DeleteObjectL ( TDesC & aObjectId ) [private]

DeleteObjectL deletes object with aObjectId.

Parameters

TDesC & aObjectId

GetConstantValue(const TDesC &, TDes &)

IMPORT_C TInt GetConstantValue ( const TDesC & aName,
TDes & aValue
)

Internal fuction to get const value defined in [Define]...[Enddefine] section of script file

Parameters

const TDesC & aName
TDes & aValue

GetLocalValue(const TDesC &, TDes &)

IMPORT_C TInt GetLocalValue ( const TDesC & aName,
TDes & aValue
)

Internal fuction to get local value.

Parameters

const TDesC & aName
TDes & aValue

GetObject(const TDesC &)

TTestObjectBase * GetObject ( const TDesC & aObjectId ) [private]

GetObject returns object corresponding to aObjectId.

Parameters

const TDesC & aObjectId

GetSubL(const TDesC &)

CStifSectionParser * GetSubL ( const TDesC & aSubName ) [private]

Read sub section from test case file.

Parameters

const TDesC & aSubName

GetTestCaseL(TInt, const TFileName &)

CStifSectionParser * GetTestCaseL ( TInt aCaseNumber,
const TFileName & aConfig
) [private]

GetTestCaseL gets the specified test case section from the onfigfile.

Parameters

TInt aCaseNumber
const TFileName & aConfig

GetTestCasesL(const TFileName &, RPointerArray< TTestCaseInfo > &)

TInt GetTestCasesL ( const TFileName & aConfigFile,
RPointerArray < TTestCaseInfo > & aTestCases
) [virtual]

GetTestCasesL is used to inquire testcases.

Parameters

const TFileName & aConfigFile
RPointerArray < TTestCaseInfo > & aTestCases

GetTestScriptObject(const TDesC &)

TInt GetTestScriptObject ( const TDesC & aObjectName )

Get pointer to test class object.

Parameters

const TDesC & aObjectName

InitL(TFileName &, TBool)

TInt InitL ( TFileName & aIniFile,
TBool aFirstTime
) [virtual]

Test module initialization.

Parameters

TFileName & aIniFile
TBool aFirstTime

LoadTestModuleL(TDesC &)

TTestModule * LoadTestModuleL ( TDesC & aModule ) [private]

LoadTestModuleL loads test module.

Parameters

TDesC & aModule

NewL()

CTestScripter * NewL ( ) [static]

Two-phased constructor.

ReadInitializationL(const TDesC &, RPointerArray< CDefinedValue > &)

void ReadInitializationL ( const TDesC & aIniFile,
RPointerArray < CDefinedValue > & aDefines
) [private]

Read initialization from file.

Parameters

const TDesC & aIniFile
RPointerArray < CDefinedValue > & aDefines

RunTestCaseL(const TInt, const TFileName &, TTestResult &)

TInt RunTestCaseL ( const TInt aCaseNumber,
const TFileName & aConfig,
TTestResult & aResult
) [virtual]

RunTestCase is used to run an individual test case specified by aTestCase.

Parameters

const TInt aCaseNumber
const TFileName & aConfig
TTestResult & aResult

RunTestL()

void RunTestL ( ) [private]

RunTestL runs the testcase specified in section.

SetLocalValue(const TDesC &, const TDesC &)

IMPORT_C TInt SetLocalValue ( const TDesC & aName,
const TDesC & aValue
)

Internal fuction to set local value.

Parameters

const TDesC & aName
const TDesC & aValue

SetResultDescription(const TDesC &)

IMPORT_C void SetResultDescription ( const TDesC & aDescr )

Set result description of test case.

Parameters

const TDesC & aDescr

TestRunner()

CTestRunner & TestRunner ( ) [inline]

Return runner handle.

UpdateTestCaseResult(const TInt, const TDesC &)

void UpdateTestCaseResult ( const TInt aError,
const TDesC & aDescr
) [private]

Updates result of test case.

Parameters

const TInt aError
const TDesC & aDescr

Member Data Documentation

TBool iAddTestCaseTitleToLogName

TBool iAddTestCaseTitleToLogName [private]

TBool iCheckHeapBalance

TBool iCheckHeapBalance [private]

TFileName iConfig

TFileName iConfig [private]

CStifSectionParser * iCurrentParser

CStifSectionParser * iCurrentParser [private]

TBool iCurrentParserReadFirstLine

TBool iCurrentParserReadFirstLine [private]

RPointerArray< CDefinedValue > iDefinedIni

RPointerArray < CDefinedValue > iDefinedIni [private]

RPointerArray< CDefinedValue > iDefinedLocal

RPointerArray < CDefinedValue > iDefinedLocal [private]

RPointerArray< CDefinedValue > iDefinedRuntime

RPointerArray < CDefinedValue > iDefinedRuntime [private]

CStifLogger * iLog

CStifLogger * iLog

TBool iOOMIgnoreFailure

TBool iOOMIgnoreFailure [private]

RPointerArray< CStifSectionParser > iParserStack

RPointerArray < CStifSectionParser > iParserStack [private]

TTestResult iResult

TTestResult iResult [private]

CStifSectionParser * iSectionParser

CStifSectionParser * iSectionParser [private]

CStifLogger * iStdLog

CStifLogger * iStdLog [private]

CStifLogger * iTCLog

CStifLogger * iTCLog [private]

RPointerArray< TTestModule > iTestModules

RPointerArray < TTestModule > iTestModules [private]

RPointerArray< TTestObjectBase > iTestObjects

RPointerArray < TTestObjectBase > iTestObjects [private]

CTestRunner * iTestRunner

CTestRunner * iTestRunner [private]