CTestModuleController Class Reference

class CTestModuleController : public CActive

Inherits from

Public Member Functions
~CTestModuleController ()
void AddConfigFileL ( TFileName &)
CAtsLogger & AtsLogger ()
void CaseCreated ()
void CaseFinished ()
CTestModuleController * CloneL ( CTestModuleController *, TBool , CTestScripterController *)
void DeleteModuleController ( CTestModuleController *)
void DoCancel ()
void EnumerateSynchronously (void)
TBool EnumerationComplete ()
void FreeTestCases ()
CTestModuleController * GetFreeOrCreateModuleControllerL ( TTestInfo &, TBool )
void InitL ( TFileName &, const TDesC &)
const TDesC & ModuleName (const TDesC &)
CTestModuleController * NewL ( CTestEngine *, const TName &, TBool , TBool , CTestScripterController *)
void RemoveConfigFileL ( TFileName &)
void RemoveModuleController ( CTestModuleController *)
TInt RunError ( TInt )
void RunL ()
RTestServer & Server ( TTestInfo &)
void StartEnumerateL ()
CFixedFlatArray < TTestInfo > * TestCasesL ()
Protected Member Functions
CTestModuleController ( CTestEngine *)
Private Member Functions
TInt ConstructASTLoggerL ( TDesC &, TBool &)
void ConstructL (const TName &, TBool , CTestScripterController *)
void LeaveWithNotifyL ( TInt , const TDesC &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
Protected Member Enumerations
enum TTestModuleStatus { ETestModuleIdle , ETestModuleEnumerateCases , ETestModuleEnumerateCasesCompleted }
Inherited Enumerations
CActive:TPriority
Protected Member Type Definitions
typedef CFixedFlatArray < TTestCaseInfo > TTestCaseArray
Public Attributes
RPointerArray < HBufC > iConfigFiles
TBool iTestModuleCrashDetected
Protected Attributes
TBool iAfterReboot
CAtsLogger * iAtsLogger
RPointerArray < CTestModuleController > iChildrenControllers
CTestEngine * iEngine
TPtrC iEnumConfigFile
TCaseSize iEnumResultPackage
TBool iEnumerateComplete
TInt iEnumerateCount
CErrorPrinter * iErrorPrinter
RPointerArray < HBufC > iFailedEnumerateConfig
TInt iFailedEnumerateCount
TFileName iInifile
RTestModule iModule
HBufC * iName
RTestServer iServer
CServerStateHandler * iServerStateHandler
TTestModuleStatus iState
RPointerArray < TTestCaseArray > iTestCaseArray
TInt iTestCaseCount
TInt iTestCaseCounter
CTestScripterController * iTestScripterController
TInt iTestScripterIndicator
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CTestModuleController(CTestEngine *)

CTestModuleController ( CTestEngine * aEngine ) [protected]

Parametric constructor.

Parameters

CTestEngine * aEngine

~CTestModuleController()

~CTestModuleController ( ) [virtual]

Destructor.

Member Functions Documentation

AddConfigFileL(TFileName &)

void AddConfigFileL ( TFileName & aConfigFile ) [virtual]

Add config file

Parameters

TFileName & aConfigFile

AtsLogger()

CAtsLogger & AtsLogger ( ) [inline, virtual]

Return reference to AtsLogger

CaseCreated()

void CaseCreated ( ) [virtual]

Increases the value of iTestCaseCounter

CaseFinished()

void CaseFinished ( ) [virtual]

Decreases the value of iTestCaseCounter and checks can old testmodulecontroller deleted or not.

CloneL(CTestModuleController *, TBool, CTestScripterController *)

CTestModuleController * CloneL ( CTestModuleController * aTestModuleController,
TBool aAfterReset,
CTestScripterController * aTestScripterController
) [virtual]

Returns pointer to the created clone of the TestModuleController

Parameters

CTestModuleController * aTestModuleController
TBool aAfterReset
CTestScripterController * aTestScripterController

ConstructASTLoggerL(TDesC &, TBool &)

TInt ConstructASTLoggerL ( TDesC & atsName,
TBool & aAfterReboot
) [private]

Construct ATS logger. Added this function due to compiler error with CW 3.0 when there are multiple TRAPDs

Parameters

TDesC & atsName
TBool & aAfterReboot

ConstructL(const TName &, TBool, CTestScripterController *)

void ConstructL ( const TName & aName,
TBool aAfterReboot,
CTestScripterController * aTestScripterController
) [private]

By default Symbian OS constructor is private.

Parameters

const TName & aName
TBool aAfterReboot
CTestScripterController * aTestScripterController

DeleteModuleController(CTestModuleController *)

void DeleteModuleController ( CTestModuleController * aRealModuleController ) [virtual]

Deletes given module controller (used only in CTestScripterController ).

Parameters

CTestModuleController * aRealModuleController

DoCancel()

void DoCancel ( ) [virtual]

DoCancel derived from CActive handles the cancellation

EnumerateSynchronously(void)

void EnumerateSynchronously ( void ) [virtual]

Enumerates test module controller synchronously. This is used when new test module controller is created when stif is about to run test case.

Parameters

void

EnumerationComplete()

TBool EnumerationComplete ( ) [virtual]

Is enumeration complete?

FreeTestCases()

void FreeTestCases ( ) [virtual]

Free used memory for test cases

GetFreeOrCreateModuleControllerL(TTestInfo &, TBool)

CTestModuleController * GetFreeOrCreateModuleControllerL ( TTestInfo & aTestInfo,
TBool aUITestingSupport
) [virtual]

Finds free test module controller, if not possible, creates new one.

Parameters

TTestInfo & aTestInfo
TBool aUITestingSupport

InitL(TFileName &, const TDesC &)

void InitL ( TFileName & aIniFile,
const TDesC & aConfigFile
) [virtual]

Init the test module

Parameters

TFileName & aIniFile
const TDesC & aConfigFile

LeaveWithNotifyL(TInt, const TDesC &)

void LeaveWithNotifyL ( TInt aCode,
const TDesC & aText
) [private]

Generate error report to xml result file and leave with notify.

Parameters

TInt aCode
const TDesC & aText

ModuleName(const TDesC &)

const TDesC & ModuleName ( const TDesC & aModuleName ) [virtual]

Return the name of Test Module.

Parameters

const TDesC & aModuleName

NewL(CTestEngine *, const TName &, TBool, TBool, CTestScripterController *)

CTestModuleController * NewL ( CTestEngine * aEngine,
const TName & aName,
TBool aAfterReboot,
TBool aCreateTestScripterCont = EFalse,
CTestScripterController * aTestScripterController = NULL
) [static]

Two-phased constructor.

Parameters

CTestEngine * aEngine
const TName & aName
TBool aAfterReboot
TBool aCreateTestScripterCont = EFalse
CTestScripterController * aTestScripterController = NULL

RemoveConfigFileL(TFileName &)

void RemoveConfigFileL ( TFileName & aConfigFile ) [virtual]

Remove config file

Parameters

TFileName & aConfigFile

RemoveModuleController(CTestModuleController *)

void RemoveModuleController ( CTestModuleController * aRealModuleController ) [virtual]

Removes given module controller from child list (used only in CTestScripterController ).

Parameters

CTestModuleController * aRealModuleController

RunError(TInt)

TInt RunError ( TInt aError ) [virtual]

RunError derived from CActive handles errors from active handler.

Parameters

TInt aError

RunL()

void RunL ( ) [virtual]

RunL derived from CActive handles the completed requests.

Server(TTestInfo &)

RTestServer & Server ( TTestInfo & aTestInfo ) [virtual]

Return handle to Test Server

Parameters

TTestInfo & aTestInfo

StartEnumerateL()

void StartEnumerateL ( ) [virtual]

StartEnumerateL starts the CTestModuleController active object.

TestCasesL()

CFixedFlatArray < TTestInfo > * TestCasesL ( ) [virtual]

Get Test Cases

Member Enumerations Documentation

Enum TTestModuleStatus

Enumerators

ETestModuleIdle
ETestModuleEnumerateCases
ETestModuleEnumerateCasesCompleted

Member Type Definitions Documentation

Typedef TTestCaseArray

typedef CFixedFlatArray < TTestCaseInfo > TTestCaseArray [protected]

Member Data Documentation

TBool iAfterReboot

TBool iAfterReboot [protected]

CAtsLogger * iAtsLogger

CAtsLogger * iAtsLogger [protected]

RPointerArray< CTestModuleController > iChildrenControllers

RPointerArray < CTestModuleController > iChildrenControllers [protected]

RPointerArray< HBufC > iConfigFiles

RPointerArray < HBufC > iConfigFiles

CTestEngine * iEngine

CTestEngine * iEngine [protected]

TPtrC iEnumConfigFile

TPtrC iEnumConfigFile [protected]

TCaseSize iEnumResultPackage

TCaseSize iEnumResultPackage [protected]

TBool iEnumerateComplete

TBool iEnumerateComplete [protected]

TInt iEnumerateCount

TInt iEnumerateCount [protected]

CErrorPrinter * iErrorPrinter

CErrorPrinter * iErrorPrinter [protected]

RPointerArray< HBufC > iFailedEnumerateConfig

RPointerArray < HBufC > iFailedEnumerateConfig [protected]

TInt iFailedEnumerateCount

TInt iFailedEnumerateCount [protected]

TFileName iInifile

TFileName iInifile [protected]

RTestModule iModule

RTestModule iModule [protected]

HBufC * iName

HBufC * iName [protected]

RTestServer iServer

RTestServer iServer [protected]

CServerStateHandler * iServerStateHandler

CServerStateHandler * iServerStateHandler [protected]

TTestModuleStatus iState

TTestModuleStatus iState [protected]

RPointerArray< TTestCaseArray > iTestCaseArray

RPointerArray < TTestCaseArray > iTestCaseArray [protected]

TInt iTestCaseCount

TInt iTestCaseCount [protected]

TInt iTestCaseCounter

TInt iTestCaseCounter [protected]

TBool iTestModuleCrashDetected

TBool iTestModuleCrashDetected

CTestScripterController * iTestScripterController

CTestScripterController * iTestScripterController [protected]

TInt iTestScripterIndicator

TInt iTestScripterIndicator [protected]