RTestExecution Class Reference

class RTestExecution : public RSubSessionBase

Inherits from

Public Member Functions
IMPORT_C TInt CancelAsyncRequest ( TInt )
IMPORT_C void Close ()
IMPORT_C TInt NotifyCommand ( TCommandPckg &, TBuf8 < KMaxCommandParamsLength > &, TRequestStatus &, TInt )
IMPORT_C TInt NotifyCommand2 ( TCommandPckg &, TDes8 &, TRequestStatus &, TInt )
IMPORT_C TInt NotifyData ( TDes8 &, TRequestStatus &)
IMPORT_C TInt NotifyEvent ( TEventIfPckg &, TRequestStatus &, TInt )
IMPORT_C TInt NotifyProgress ( TTestProgressPckg &, TRequestStatus &)
IMPORT_C TInt NotifyRemoteCmd ( TStifCommandPckg &, TPckg < TInt > &, TRequestStatus &)
IMPORT_C TInt Open ( RTestServer &, const TInt , const TFileName &)
IMPORT_C TInt Pause ()
IMPORT_C TInt ReadRemoteCmdInfo ( TDes8 &, TStifCommand , TInt )
IMPORT_C TInt Resume ()
IMPORT_C void RunTestCase ( TFullTestResultPckg &, TRequestStatus &)
IMPORT_C void RunTestCase ( TFullTestResultPckg &, const TDesC &, TRequestStatus &)
Inherited Functions
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const

Member Functions Documentation

CancelAsyncRequest(TInt)

IMPORT_C TInt CancelAsyncRequest ( TInt aReqToCancel )

Asynchronous request can be canceled with CancelAsyncRequest method. The aReqToCancel parameter defines the request that will be canceled.

Parameters

TInt aReqToCancel

Close()

IMPORT_C void Close ( )

Closes the RTestExecution subsession. Test case is normally closed immediately after the test case was completed.

NotifyCommand(TCommandPckg &, TBuf8< KMaxCommandParamsLength > &, TRequestStatus &, TInt)

IMPORT_C TInt NotifyCommand ( TCommandPckg & aCommandPckg,
TBuf8 < KMaxCommandParamsLength > & aParamsPckg,
TRequestStatus & aStatus,
TInt aError =  KErrNone
)

NotifyCommand is used to control commands from the test case. It was created to allow test case to kill itself. DEPRECATED !! Use NotifyCommand2 instead.

Parameters

TCommandPckg & aCommandPckg
TBuf8 < KMaxCommandParamsLength > & aParamsPckg
TRequestStatus & aStatus
TInt aError =  KErrNone

NotifyCommand2(TCommandPckg &, TDes8 &, TRequestStatus &, TInt)

IMPORT_C TInt NotifyCommand2 ( TCommandPckg & aCommandPckg,
TDes8 & aParamsPckg,
TRequestStatus & aStatus,
TInt aError =  KErrNone
)

NotifyCommand is used to control commands from the test case. It was created to allow test case to kill itself.

Parameters

TCommandPckg & aCommandPckg
TDes8 & aParamsPckg
TRequestStatus & aStatus
TInt aError =  KErrNone

NotifyData(TDes8 &, TRequestStatus &)

IMPORT_C TInt NotifyData ( TDes8 & aData,
TRequestStatus & aStatus
)

NotifyData is used to receive different data from the Test Server, e.g. images or web pages which can be then viewed to tester or forwarded to some kind of comparison tool.

Parameters

TDes8 & aData
TRequestStatus & aStatus

NotifyEvent(TEventIfPckg &, TRequestStatus &, TInt)

IMPORT_C TInt NotifyEvent ( TEventIfPckg & aEvent,
TRequestStatus & aStatus,
TInt aError =  KErrNone
)

NotifyEvent is used to control event system.

Parameters

TEventIfPckg & aEvent
TRequestStatus & aStatus
TInt aError =  KErrNone

NotifyProgress(TTestProgressPckg &, TRequestStatus &)

IMPORT_C TInt NotifyProgress ( TTestProgressPckg & aProgress,
TRequestStatus & aStatus
)

NotifyProgress requests different progress information from the Test DLL. This information can be e.g. printed to UI. Progress information is returned to aProgress. The aProgress is TTestProgressPckg that is a packaged TTestProgress .

Parameters

TTestProgressPckg & aProgress
TRequestStatus & aStatus

NotifyRemoteCmd(TStifCommandPckg &, TPckg< TInt > &, TRequestStatus &)

IMPORT_C TInt NotifyRemoteCmd ( TStifCommandPckg & aRemoteCommand,
TPckg < TInt > & aMsgSizePckg,
TRequestStatus & aStatus
)

NotifyRemoteCmd is used to get notify.

Parameters

TStifCommandPckg & aRemoteCommand
TPckg < TInt > & aMsgSizePckg
TRequestStatus & aStatus

Open(RTestServer &, const TInt, const TFileName &)

IMPORT_C TInt Open ( RTestServer & aServer,
const TInt aCaseNumber,
const TFileName & aConfig
)

Open creates a subsession for new test case. Test case to be executed is specified by aTestCaseNumber. The aConfig specifies the optional config file where the test case is defined. Test cases that can be executed are retrieved from the Test Server by calling two-phased RTestModule::GetTestCases operation.

Parameters

RTestServer & aServer
const TInt aCaseNumber
const TFileName & aConfig

Pause()

IMPORT_C TInt Pause ( )

Pause suspends the execution of the test case. The subsession where the test case is run will be suspended and thus the test case execution is suspended. The test case execution can be later resumed by calling Resume.

ReadRemoteCmdInfo(TDes8 &, TStifCommand, TInt)

IMPORT_C TInt ReadRemoteCmdInfo ( TDes8 & aRemoteMsg,
TStifCommand aType,
TInt aError =  KErrNone
)

ReadRemoteCmdInfo for remote message.

Parameters

TDes8 & aRemoteMsg
TStifCommand aType
TInt aError =  KErrNone

Resume()

IMPORT_C TInt Resume ( )

Resume is used to resume the test case suspended by previously called Pause method. The test case execution should be continued immediately after the Resume is called.

RunTestCase(TFullTestResultPckg &, TRequestStatus &)

IMPORT_C void RunTestCase ( TFullTestResultPckg & aResult,
TRequestStatus & aStatus
)

RunTestCase is used to execute the test case previously initialized by Open method. RunTestCase is asynchronous method and it is completed when the test case is completed. The result of the test case is returned to aStatus.

Parameters

TFullTestResultPckg & aResult
TRequestStatus & aStatus

RunTestCase(TFullTestResultPckg &, const TDesC &, TRequestStatus &)

IMPORT_C void RunTestCase ( TFullTestResultPckg & aResult,
const TDesC & aTestCaseArgs,
TRequestStatus & aStatus
)

RunTestCase is used to execute the test case previously initialized by Open method. RunTestCase is asynchronous method and it is completed when the test case is completed. The result of the test case is returned to aStatus.

Parameters

TFullTestResultPckg & aResult
const TDesC & aTestCaseArgs
TRequestStatus & aStatus