CTestExecution Class Reference

class CTestExecution : public CObject

Inherits from

Public Member Functions
~CTestExecution ()
TInt CancelCommandRequest ()
void CancelEvent ()
TInt CancelRequestL (const RMessage2 &)
TInt CancelTestExecution ()
void CleanupEvents ()
TInt CloseTestExecution (const RMessage2 &)
CCommandDef & CommandDef ()
TInt CommandMutexHandle ()
TInt CommandSemHandle ()
void CompletePrintRequestIfQueueEmpty ()
void CompleteTestExecution (const TInt , const TFullTestResult::TCaseExecutionResult , const TInt , const TInt , const TDesC &)
void CompleteTestExecution (const TInt )
void DoErrorPrint ()
TInt DoNotifyCommand ()
TInt DoNotifyEvent ()
void DoNotifyInterference ()
TInt DoNotifyMeasurement ()
void DoNotifyPrint ()
void DoRemoteReceive ()
void DoRemoteSend ()
TEventDef & EventDef ()
TInt EventMutexHandle ()
TInt EventSemHandle ()
TFullTestResult & FullResult ()
const TDesC & GetConfigFileName ()
TRequestStatus * GetRq ( TRequestType )
const TDesC & GetTestCaseArguments ()
TInt InterferenceMutexHandle ()
TInt InterferenceSemHandle ()
TInt KillTestMeasurement ()
TInt KillTestinterferenceThread ()
TInt MeasurementMutexHandle ()
TInt MeasurementSemHandle ()
CTestExecution * NewL ( CTestModule *, TInt , const TFileName &)
TInt NotifyCommand (const RMessage2 &)
TInt NotifyEvent (const RMessage2 &)
TInt NotifyPrint (const RMessage2 &)
TInt NotifyRemoteCmd (const RMessage2 &)
TInt Pause (const RMessage2 &)
TInt PrintMutexHandle ()
TInt PrintSemHandle ()
TCmdDef & RcvInfo ()
TInt RcvMutexHandle ()
TInt RcvSemHandle ()
TInt ReadRemoteCmdInfo (const RMessage2 &)
TInt Resume (const RMessage2 &)
TInt RunTestCase (const RMessage2 &)
void SetTestThread ( TThreadId )
void SetThreadState (const TTestState )
TCmdDef & SndInfo ()
TInt SndMutexHandle ()
TInt SndSemHandle ()
TTestInterference & TestInterference ()
TTestMeasurement & TestMeasurement ()
TTestProgress & TestProgress ()
TInt & TestThreadFailure ()
TInt TestThreadMutexHandle ()
TTestState ThreadState ()
void UnsetStateEvents ()
Private Member Functions
CTestExecution ()
TInt CancelEventRequest ()
TInt CancelInterferenceRequest ()
TInt CancelPrintRequest ()
TInt CancelRemoteCmdRequest ()
TInt CancelTestRequest ()
void CompleteEvent ( TInt )
void ConstructL ( CTestModule *, TInt , const TFileName &)
TInt EventStateChange ( TEventIf &)
TInt ReleaseEvent ( TEventIf &)
TInt RequestEvent ( TEventIf &)
void TestThreadRequestComplete ( TRequestStatus *, TInt )
TInt UnsetEvent ( TEventIf &, const RMessage2 &)
TInt WaitEvent ( TEventIf &, TRequestStatus *)
TInt WritePrint ( TTestProgress &)
Inherited Functions
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()
CObject::AccessCount()const
CObject::CObject()
CObject::Close()
CObject::Dec()
CObject::Extension_(TUint,TAny *&,TAny *)
CObject::FullName()const
CObject::Inc()
CObject::Name()const
CObject::Open()
CObject::Owner()const
CObject::SetName(const TDesC *)
CObject::SetNameL(const TDesC *)
CObject::SetOwner(CObject *)
CObject::UniqueID()const
CObject::~CObject()
Public Member Enumerations
enum TRequestType {
ERqPrint , ERqEvent , ERqSnd , ERqRcv , ERqInterference , ERqMeasurement , ERqCommand
}
enum TTestState { ENotStarted , EOnGoing , EFinished , ECancelled }
enum TTestThreadFailure { ETestThreadOk  = 0, ETestMemLeak  = 0x00000001, ETestRequestLeak  = 0x00000002, ETestHandleLeak  = 0x00000004 }
Private Attributes
TInt iCaseNumber
TCmdDef iCmdDef
CCommandDef * iCommandDef
CCommandHandler * iCommandHandler
RMutex iCommandMutex
TBool iCommandNotifyAvailable
RSemaphore iCommandSem
TPtr iConfig
HBufC * iConfigNameBuffer
RPointerArray < TEvent > iEventArray
TEventDef iEventDef
CEventHandler * iEventHandler
RMutex iEventMutex
TBool iEventNotifyAvailable
RSemaphore iEventSem
TFullTestResult iFullResult
CInterferenceHandler * iInterferenceHandler
RMutex iInterferenceMutex
TBool iInterferenceNotifyAvailable
RSemaphore iInterferenceSem
CMeasurementHandler * iMeasurementHandler
RPointerArray < TMeasurementHandling > iMeasurementHandlingArray
RMutex iMeasurementMutex
TBool iMeasurementNotifyAvailable
RSemaphore iMeasurementSem
RPointerArray < HBufC8 > iMessageQueue
CTestModuleContainer * iModuleContainer
CTestModule * iModuleSession
RMessage2 iNotifyCommandMessage
RMessage2 iNotifyEventMessage
RMessage2 iNotifyInterferenceMessage
RMessage2 iNotifyMeasurementMessage
RMessage2 iNotifyPrintMessage
RMessage2 iNotifyRemoteCmdMessage
CPrintHandler * iPrintHandler
RMutex iPrintMutex
TBool iPrintNotifyAvailable
CPrintQueue * iPrintQueue
RSemaphore iPrintSem
TTestProgress iProgress
TCmdDef iRcvCmdDef
CRcvHandler * iRcvHandler
RMutex iRcvMutex
RSemaphore iRcvSem
TBool iRemoteReceiveAvailable
TBool iRemoteSendAvailable
RArray < RThread > iSTIFTestInterferenceArray
CSndHandler * iSndHandler
RMutex iSndMutex
RSemaphore iSndSem
RPointerArray < TDesC > iStateEvents
HBufC * iTestCaseArgs
RMessage2 iTestExeMessage
TTestInterference iTestInterference
TTestMeasurement iTestMeasurement
RThread iTestThread
TInt iTestThreadFailure
TThreadId iTestThreadId
RMutex iTestThreadMutex
TBool iTestThreadOpen
TTestState iThreadState

Constructor & Destructor Documentation

CTestExecution()

CTestExecution ( ) [private]

C++ default constructor.

~CTestExecution()

~CTestExecution ( ) [virtual]

Destructor

Member Functions Documentation

CancelCommandRequest()

TInt CancelCommandRequest ( )

Cancels command request. Created to allow test case to kill itself.

CancelEvent()

void CancelEvent ( )

Completes a event cancel request.

CancelEventRequest()

TInt CancelEventRequest ( ) [private]

Cancel event request.

CancelInterferenceRequest()

TInt CancelInterferenceRequest ( ) [private]

Cancels test interference request.

CancelPrintRequest()

TInt CancelPrintRequest ( ) [private]

Cancels print request.

CancelRemoteCmdRequest()

TInt CancelRemoteCmdRequest ( ) [private]

Cancel event request.

CancelRequestL(const RMessage2 &)

TInt CancelRequestL ( const RMessage2 & aMessage )

Cancels asynchronous request

Parameters

const RMessage2 & aMessage

CancelTestExecution()

TInt CancelTestExecution ( )

Cancels test(s) execution in special cases e.g. timeout, exit etc.

CancelTestRequest()

TInt CancelTestRequest ( ) [private]

Cancels test execution request

CleanupEvents()

void CleanupEvents ( )

Completes print request if print queue is empty

CloseTestExecution(const RMessage2 &)

TInt CloseTestExecution ( const RMessage2 & aMessage )

Close Test Execution

Parameters

const RMessage2 & aMessage

CommandDef()

CCommandDef & CommandDef ( ) [inline]

CommandMutexHandle()

TInt CommandMutexHandle ( ) [inline]

CommandSemHandle()

TInt CommandSemHandle ( ) [inline]

CompleteEvent(TInt)

void CompleteEvent ( TInt aError ) [private]

Complete event TRequestStatus if pending.

Parameters

TInt aError

CompletePrintRequestIfQueueEmpty()

void CompletePrintRequestIfQueueEmpty ( )

Completes print request if print queue is empty

CompleteTestExecution(const TInt, const TFullTestResult::TCaseExecutionResult, const TInt, const TInt, const TDesC &)

void CompleteTestExecution ( const TInt aCompletionCode,
const TFullTestResult::TCaseExecutionResult aCaseExecutionType,
const TInt aCaseExecutionCode,
const TInt aCaseResult,
const TDesC & aText
)

Completes test execution

Parameters

const TInt aCompletionCode
const TFullTestResult::TCaseExecutionResult aCaseExecutionType
const TInt aCaseExecutionCode
const TInt aCaseResult
const TDesC & aText

CompleteTestExecution(const TInt)

void CompleteTestExecution ( const TInt aCompletionCode )

Completes test execution

Parameters

const TInt aCompletionCode

ConstructL(CTestModule *, TInt, const TFileName &)

void ConstructL ( CTestModule * aModuleSession,
TInt aCaseNumber,
const TFileName & aConfig
) [private]

By default Symbian OS constructor is private.

Parameters

CTestModule * aModuleSession
TInt aCaseNumber
const TFileName & aConfig

DoErrorPrint()

void DoErrorPrint ( )

Completes a print request.

DoNotifyCommand()

TInt DoNotifyCommand ( )

Completes a command request. Created to allow test case to kill itself.

DoNotifyEvent()

TInt DoNotifyEvent ( )

Completes a event request.

DoNotifyInterference()

void DoNotifyInterference ( )

Completes a interference request.

DoNotifyMeasurement()

TInt DoNotifyMeasurement ( )

Completes a measurement request.

DoNotifyPrint()

void DoNotifyPrint ( )

Completes a print request.

DoRemoteReceive()

void DoRemoteReceive ( )

Enables remote command receiving.

DoRemoteSend()

void DoRemoteSend ( )

Sends remote commands.

EventDef()

TEventDef & EventDef ( ) [inline]

EventMutexHandle()

TInt EventMutexHandle ( ) [inline]

Get mutex handles.

EventSemHandle()

TInt EventSemHandle ( ) [inline]

Get semaphore handles.

EventStateChange(TEventIf &)

TInt EventStateChange ( TEventIf & aEvent ) [private]

Handle state events.

Parameters

TEventIf & aEvent

FullResult()

TFullTestResult & FullResult ( ) [inline]

Access to "shared" memory.

GetConfigFileName()

const TDesC & GetConfigFileName ( ) const [inline]

GetRq(TRequestType)

TRequestStatus * GetRq ( TRequestType aType )

Get specific TRequestStatus variable.

Parameters

TRequestType aType

GetTestCaseArguments()

const TDesC & GetTestCaseArguments ( ) const

Get test case arguments.

InterferenceMutexHandle()

TInt InterferenceMutexHandle ( ) [inline]

InterferenceSemHandle()

TInt InterferenceSemHandle ( ) [inline]

KillTestMeasurement()

TInt KillTestMeasurement ( )

Make sure that any of the test measurement process's won't stay to run if test case is crashed of test measurement object is not deleted.

KillTestinterferenceThread()

TInt KillTestinterferenceThread ( )

Make sure that any of the test interference thread's won't stay to run if test case is crashed of test interference object is not deleted.

MeasurementMutexHandle()

TInt MeasurementMutexHandle ( ) [inline]

MeasurementSemHandle()

TInt MeasurementSemHandle ( ) [inline]

NewL(CTestModule *, TInt, const TFileName &)

CTestExecution * NewL ( CTestModule * aModuleSession,
TInt aCaseNumber,
const TFileName & aConfig
) [static]

NewL is first phase of two-phased constructor.

Parameters

CTestModule * aModuleSession
TInt aCaseNumber
const TFileName & aConfig

NotifyCommand(const RMessage2 &)

TInt NotifyCommand ( const RMessage2 & aMessage )

Executes command for ongoing test case. Created to allow test case to kill itself.

Parameters

const RMessage2 & aMessage

NotifyEvent(const RMessage2 &)

TInt NotifyEvent ( const RMessage2 & aMessage )

Sets a event notification

Parameters

const RMessage2 & aMessage

NotifyPrint(const RMessage2 &)

TInt NotifyPrint ( const RMessage2 & aMessage )

Sets a print notification

Parameters

const RMessage2 & aMessage

NotifyRemoteCmd(const RMessage2 &)

TInt NotifyRemoteCmd ( const RMessage2 & aMessage )

Sets a RemoteCmd notification

Parameters

const RMessage2 & aMessage

Pause(const RMessage2 &)

TInt Pause ( const RMessage2 & aMessage )

Pauses ongoing test case

Parameters

const RMessage2 & aMessage

PrintMutexHandle()

TInt PrintMutexHandle ( ) [inline]

PrintSemHandle()

TInt PrintSemHandle ( ) [inline]

RcvInfo()

TCmdDef & RcvInfo ( ) [inline]

RcvMutexHandle()

TInt RcvMutexHandle ( ) [inline]

RcvSemHandle()

TInt RcvSemHandle ( ) [inline]

ReadRemoteCmdInfo(const RMessage2 &)

TInt ReadRemoteCmdInfo ( const RMessage2 & aMessage )

Reads a RemoteCmd notification

Parameters

const RMessage2 & aMessage

ReleaseEvent(TEventIf &)

TInt ReleaseEvent ( TEventIf & aEvent ) [private]

Handle event releases.

Parameters

TEventIf & aEvent

RequestEvent(TEventIf &)

TInt RequestEvent ( TEventIf & aEvent ) [private]

Handle event request.

Parameters

TEventIf & aEvent

Resume(const RMessage2 &)

TInt Resume ( const RMessage2 & aMessage )

Resumes a paused test case

Parameters

const RMessage2 & aMessage

RunTestCase(const RMessage2 &)

TInt RunTestCase ( const RMessage2 & aMessage )

Run a test case

Parameters

const RMessage2 & aMessage

SetTestThread(TThreadId)

void SetTestThread ( TThreadId aThreadId ) [inline]

Set execution test thread id.

Parameters

TThreadId aThreadId

SetThreadState(const TTestState)

void SetThreadState ( const TTestState aState )

Set thread State. This function can be called from test execution thread.

Parameters

const TTestState aState

SndInfo()

TCmdDef & SndInfo ( ) [inline]

SndMutexHandle()

TInt SndMutexHandle ( ) [inline]

SndSemHandle()

TInt SndSemHandle ( ) [inline]

TestInterference()

TTestInterference & TestInterference ( ) [inline]

TestMeasurement()

TTestMeasurement & TestMeasurement ( ) [inline]

TestProgress()

TTestProgress & TestProgress ( ) [inline]

TestThreadFailure()

TInt & TestThreadFailure ( ) [inline]

TestThreadMutexHandle()

TInt TestThreadMutexHandle ( ) [inline]

Get mutex handle. This mutex meaning is to make sure that test complete and test case cancel operations are not executed at the same time.

TestThreadRequestComplete(TRequestStatus *, TInt)

void TestThreadRequestComplete ( TRequestStatus * aStatus,
TInt aCode
) [private]

Complete request in test thread.

Parameters

TRequestStatus * aStatus
TInt aCode

ThreadState()

TTestState ThreadState ( ) [inline]

Current thread state.

UnsetEvent(TEventIf &, const RMessage2 &)

TInt UnsetEvent ( TEventIf & aEvent,
const RMessage2 & aMessage
) [private]

Handle event unsets.

Parameters

TEventIf & aEvent
const RMessage2 & aMessage

UnsetStateEvents()

void UnsetStateEvents ( )

Unsets all pending state events.

WaitEvent(TEventIf &, TRequestStatus *)

TInt WaitEvent ( TEventIf & aEvent,
TRequestStatus * aStatus
) [private]

Wait event request.

Parameters

TEventIf & aEvent
TRequestStatus * aStatus

WritePrint(TTestProgress &)

TInt WritePrint ( TTestProgress & aProgress ) [private]

Writes a print notification to client memory space.

Parameters

TTestProgress & aProgress

Member Enumerations Documentation

Enum TRequestType

Enumerators

ERqPrint
ERqEvent
ERqSnd
ERqRcv
ERqInterference
ERqMeasurement
ERqCommand

Enum TTestState

Enumerators

ENotStarted
EOnGoing
EFinished
ECancelled

Enum TTestThreadFailure

Enumerators

ETestThreadOk = 0
ETestMemLeak = 0x00000001
ETestRequestLeak = 0x00000002
ETestHandleLeak = 0x00000004

Member Data Documentation

TInt iCaseNumber

TInt iCaseNumber [private]

TCmdDef iCmdDef

TCmdDef iCmdDef [private]

CCommandDef * iCommandDef

CCommandDef * iCommandDef [private]

CCommandHandler * iCommandHandler

CCommandHandler * iCommandHandler [private]

RMutex iCommandMutex

RMutex iCommandMutex [private]

TBool iCommandNotifyAvailable

TBool iCommandNotifyAvailable [private]

RSemaphore iCommandSem

RSemaphore iCommandSem [private]

TPtr iConfig

TPtr iConfig [private]

HBufC * iConfigNameBuffer

HBufC * iConfigNameBuffer [private]

RPointerArray< TEvent > iEventArray

RPointerArray < TEvent > iEventArray [private]

TEventDef iEventDef

TEventDef iEventDef [private]

CEventHandler * iEventHandler

CEventHandler * iEventHandler [private]

RMutex iEventMutex

RMutex iEventMutex [private]

TBool iEventNotifyAvailable

TBool iEventNotifyAvailable [private]

RSemaphore iEventSem

RSemaphore iEventSem [private]

TFullTestResult iFullResult

TFullTestResult iFullResult [private]

CInterferenceHandler * iInterferenceHandler

CInterferenceHandler * iInterferenceHandler [private]

RMutex iInterferenceMutex

RMutex iInterferenceMutex [private]

TBool iInterferenceNotifyAvailable

TBool iInterferenceNotifyAvailable [private]

RSemaphore iInterferenceSem

RSemaphore iInterferenceSem [private]

CMeasurementHandler * iMeasurementHandler

CMeasurementHandler * iMeasurementHandler [private]

RPointerArray< TMeasurementHandling > iMeasurementHandlingArray

RPointerArray < TMeasurementHandling > iMeasurementHandlingArray [private]

RMutex iMeasurementMutex

RMutex iMeasurementMutex [private]

TBool iMeasurementNotifyAvailable

TBool iMeasurementNotifyAvailable [private]

RSemaphore iMeasurementSem

RSemaphore iMeasurementSem [private]

RPointerArray< HBufC8 > iMessageQueue

RPointerArray < HBufC8 > iMessageQueue [private]

CTestModuleContainer * iModuleContainer

CTestModuleContainer * iModuleContainer [private]

CTestModule * iModuleSession

CTestModule * iModuleSession [private]

RMessage2 iNotifyCommandMessage

RMessage2 iNotifyCommandMessage [private]

RMessage2 iNotifyEventMessage

RMessage2 iNotifyEventMessage [private]

RMessage2 iNotifyInterferenceMessage

RMessage2 iNotifyInterferenceMessage [private]

RMessage2 iNotifyMeasurementMessage

RMessage2 iNotifyMeasurementMessage [private]

RMessage2 iNotifyPrintMessage

RMessage2 iNotifyPrintMessage [private]

RMessage2 iNotifyRemoteCmdMessage

RMessage2 iNotifyRemoteCmdMessage [private]

CPrintHandler * iPrintHandler

CPrintHandler * iPrintHandler [private]

RMutex iPrintMutex

RMutex iPrintMutex [private]

TBool iPrintNotifyAvailable

TBool iPrintNotifyAvailable [private]

CPrintQueue * iPrintQueue

CPrintQueue * iPrintQueue [private]

RSemaphore iPrintSem

RSemaphore iPrintSem [private]

TTestProgress iProgress

TTestProgress iProgress [private]

TCmdDef iRcvCmdDef

TCmdDef iRcvCmdDef [private]

CRcvHandler * iRcvHandler

CRcvHandler * iRcvHandler [private]

RMutex iRcvMutex

RMutex iRcvMutex [private]

RSemaphore iRcvSem

RSemaphore iRcvSem [private]

TBool iRemoteReceiveAvailable

TBool iRemoteReceiveAvailable [private]

TBool iRemoteSendAvailable

TBool iRemoteSendAvailable [private]

RArray< RThread > iSTIFTestInterferenceArray

RArray < RThread > iSTIFTestInterferenceArray [private]

CSndHandler * iSndHandler

CSndHandler * iSndHandler [private]

RMutex iSndMutex

RMutex iSndMutex [private]

RSemaphore iSndSem

RSemaphore iSndSem [private]

RPointerArray< TDesC > iStateEvents

RPointerArray < TDesC > iStateEvents [private]

HBufC * iTestCaseArgs

HBufC * iTestCaseArgs [private]

RMessage2 iTestExeMessage

RMessage2 iTestExeMessage [private]

TTestInterference iTestInterference

TTestInterference iTestInterference [private]

TTestMeasurement iTestMeasurement

TTestMeasurement iTestMeasurement [private]

RThread iTestThread

RThread iTestThread [private]

TInt iTestThreadFailure

TInt iTestThreadFailure [private]

TThreadId iTestThreadId

TThreadId iTestThreadId [private]

RMutex iTestThreadMutex

RMutex iTestThreadMutex [private]

TBool iTestThreadOpen

TBool iTestThreadOpen [private]

TTestState iThreadState

TTestState iThreadState [private]