CTestModuleController Class Reference

class CTestModuleController : public CActive

Inherits from

Public Member Functions
~CTestModuleController()
voidAddConfigFileL(TFileName &)
CAtsLogger &AtsLogger()
voidCaseCreated()
voidCaseFinished()
CTestModuleController *CloneL(CTestModuleController *, TBool, CTestScripterController *)
voidDeleteModuleController(CTestModuleController *)
voidDoCancel()
voidEnumerateSynchronously(void)
TBool EnumerationComplete()
voidFreeTestCases()
CTestModuleController *GetFreeOrCreateModuleControllerL(TTestInfo &, TBool)
voidInitL(TFileName &, const TDesC &)
const TDesC &ModuleName(const TDesC &)
CTestModuleController *NewL(CTestEngine *, const TName &, TBool, TBool, CTestScripterController *)
voidRemoveConfigFileL(TFileName &)
voidRemoveModuleController(CTestModuleController *)
TInt RunError(TInt)
voidRunL()
RTestServer &Server(TTestInfo &)
voidStartEnumerateL()
CFixedFlatArray< TTestInfo > *TestCasesL()
Protected Member Functions
CTestModuleController(CTestEngine *)
Private Member Functions
TInt ConstructASTLoggerL(TDesC &, TBool &)
voidConstructL(const TName &, TBool, CTestScripterController *)
voidLeaveWithNotifyL(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
enumTTestModuleStatus { 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 &)

voidAddConfigFileL(TFileName &aConfigFile)[virtual]

Add config file

Parameters

TFileName & aConfigFile

AtsLogger()

CAtsLogger &AtsLogger()[inline, virtual]

Return reference to AtsLogger

CaseCreated()

voidCaseCreated()[virtual]

Increases the value of iTestCaseCounter

CaseFinished()

voidCaseFinished()[virtual]

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

CloneL(CTestModuleController *, TBool, CTestScripterController *)

CTestModuleController *CloneL(CTestModuleController *aTestModuleController,
TBoolaAfterReset,
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 *)

voidConstructL(const TName &aName,
TBoolaAfterReboot,
CTestScripterController *aTestScripterController
)[private]

By default Symbian OS constructor is private.

Parameters

const TName & aName
TBool aAfterReboot
CTestScripterController * aTestScripterController

DeleteModuleController(CTestModuleController *)

voidDeleteModuleController(CTestModuleController *aRealModuleController)[virtual]

Deletes given module controller (used only in CTestScripterController).

Parameters

CTestModuleController * aRealModuleController

DoCancel()

voidDoCancel()[virtual]

DoCancel derived from CActive handles the cancellation

EnumerateSynchronously(void)

voidEnumerateSynchronously(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()

voidFreeTestCases()[virtual]

Free used memory for test cases

GetFreeOrCreateModuleControllerL(TTestInfo &, TBool)

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

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

Parameters

TTestInfo & aTestInfo
TBool aUITestingSupport

InitL(TFileName &, const TDesC &)

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

Init the test module

Parameters

TFileName & aIniFile
const TDesC & aConfigFile

LeaveWithNotifyL(TInt, const TDesC &)

voidLeaveWithNotifyL(TIntaCode,
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,
TBoolaAfterReboot,
TBoolaCreateTestScripterCont = EFalse,
CTestScripterController *aTestScripterController = NULL
)[static]

Two-phased constructor.

Parameters

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

RemoveConfigFileL(TFileName &)

voidRemoveConfigFileL(TFileName &aConfigFile)[virtual]

Remove config file

Parameters

TFileName & aConfigFile

RemoveModuleController(CTestModuleController *)

voidRemoveModuleController(CTestModuleController *aRealModuleController)[virtual]

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

Parameters

CTestModuleController * aRealModuleController

RunError(TInt)

TInt RunError(TIntaError)[virtual]

RunError derived from CActive handles errors from active handler.

Parameters

TInt aError

RunL()

voidRunL()[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()

voidStartEnumerateL()[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]