RTestEngine Class Reference

class RTestEngine : public RSubSessionBase

Inherits from

Public Member Functions
IMPORT_C TIntAddConfigFile(const TName &, const TFileName &)
IMPORT_C TIntAddTestCaseResultToTestReport(const TTestInfo &, const TFullTestResult &, const TInt)
IMPORT_C TIntAddTestModule(const TName &, const TFileName &)
IMPORT_C TIntCancelAsyncRequest(TInt)
IMPORT_C voidClose()
IMPORT_C voidEnumerateTestCases(TCaseCount &, TRequestStatus &)
IMPORT_C voidErrorNotification(TErrorNotificationPckg &, TRequestStatus &)
IMPORT_C voidEvent(TEventIfPckg &, TRequestStatus &)
IMPORT_C TIntGetTestCases(CFixedFlatArray< TTestInfo > &)
IMPORT_C TIntOpen(RTestEngineServer &, const TFileName &)
IMPORT_C TIntOpenLoggerSession(RTestEngineServer &, TLoggerSettings &)
IMPORT_C TIntRemoveConfigFile(const TName &, const TFileName &)
IMPORT_C TIntRemoveTestModule(const TName &)
IMPORT_C TIntSetAttribute(TAttribute, const TDesC &)
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

AddConfigFile(const TName &, const TFileName &)

IMPORT_C TIntAddConfigFile(const TName &aTestModule,
const TFileName &aConfigFile
)

AddConfigFile is used to add dynamically a new config file to the Test Module specified by aTestModule. New test cases are then executed by calling first GetTestCases and then RunTestCase. Thus new test cases can be run from the Test Module without restarting the Test Framework.

Parameters

const TName & aTestModule
const TFileName & aConfigFile

AddTestCaseResultToTestReport(const TTestInfo &, const TFullTestResult &, const TInt)

IMPORT_C TIntAddTestCaseResultToTestReport(const TTestInfo &aTestInfo,
const TFullTestResult &aTestResult,
const TIntaError
)

Add info about test case to test report.

Parameters

const TTestInfo & aTestInfo
const TFullTestResult & aTestResult
const TInt aError

AddTestModule(const TName &, const TFileName &)

IMPORT_C TIntAddTestModule(const TName &aTestModule,
const TFileName &aIniFile
)

AddTestModule is used to add dynamically a new Test Module to the Test Framework. Test cases can then be run from the new Test Module without restarting the Test Framework. If the Test Module specified by aTestModule doesn't exists this method returns KErrNotFound. If the Test Module has been already loaded this method returns KErrAlreadyExists.

Parameters

const TName & aTestModule
const TFileName & aIniFile

CancelAsyncRequest(TInt)

IMPORT_C TIntCancelAsyncRequest(TIntaReqToCancel)

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

Parameters

TInt aReqToCancel

Close()

IMPORT_C voidClose()

Closes the RTestEngine subsession.

EnumerateTestCases(TCaseCount &, TRequestStatus &)

IMPORT_C voidEnumerateTestCases(TCaseCount &aCount,
TRequestStatus &aStatus
)

Test cases are inquired by two-phased operation calling first the EnumerateTestCases method and then the GetTestCases. Test cases are inquired from Test Engine that will inquire them from Test Modules. EnumerateTestCases requests the needed array size for test cases that will be inquired by GetTestCases method. When the EnumerateTestCases is completed succesfully the GetTestCases method is called to retrieve test cases to CArrayFixFlat <TTestInfo> list object.

TTestInfo defines individual test case and, if needed, a test set (TName iParent) where the test case belongs to. TTestInfo is used to create test case by calling RTestCase::Open that constructs the actual test case. Test case is then executed calling RTestCase::RunTestCase.

Parameters

TCaseCount & aCount
TRequestStatus & aStatus

ErrorNotification(TErrorNotificationPckg &, TRequestStatus &)

IMPORT_C voidErrorNotification(TErrorNotificationPckg &aError,
TRequestStatus &aStatus
)

ErrorNotification obtains error notifications from test engine.

Parameters

TErrorNotificationPckg & aError
TRequestStatus & aStatus

Event(TEventIfPckg &, TRequestStatus &)

IMPORT_C voidEvent(TEventIfPckg &aEvent,
TRequestStatus &aStatus
)

Event is used to get and set events in STIF Test Framework. TEventIf defines the event request information.

Parameters

TEventIfPckg & aEvent
TRequestStatus & aStatus

GetTestCases(CFixedFlatArray< TTestInfo > &)

IMPORT_C TIntGetTestCases(CFixedFlatArray< TTestInfo > &aTestCaseBuffer)

GetTestCases retrieves test cases from Test Modules to aTestCaseBuffer that is a list consisting of several TTestInfo objects. If this method is called without previously succesfully called EnumerateTestCases method, this function returns the KErrNotReady.

Parameters

CFixedFlatArray< TTestInfo > & aTestCaseBuffer

Open(RTestEngineServer &, const TFileName &)

IMPORT_C TIntOpen(RTestEngineServer &aServer,
const TFileName &aIniFile
)

Open creates a subsession to Test Engine and opens new handle to RTestEngine. The RTestEngineServer subsession shall be created by calling RTestEngineServer::Connect before calling Open to create new RTestEngine subsession.

Parameters

RTestEngineServer & aServer
const TFileName & aIniFile

OpenLoggerSession(RTestEngineServer &, TLoggerSettings &)

IMPORT_C TIntOpenLoggerSession(RTestEngineServer &aServer,
TLoggerSettings &aLoggerSettings
)

Used to get Logger's overwrite parameters.

Parameters

RTestEngineServer & aServer
TLoggerSettings & aLoggerSettings

RemoveConfigFile(const TName &, const TFileName &)

IMPORT_C TIntRemoveConfigFile(const TName &aTestModule,
const TFileName &aConfigFile
)

RemoveConfigFile is used to remove a config file from the Test Module specified by aTestModule.

Parameters

const TName & aTestModule
const TFileName & aConfigFile

RemoveTestModule(const TName &)

IMPORT_C TIntRemoveTestModule(const TName &aTestModule)

RemoveTestModule is used to remove the existing Test Module from Test Framework. If there are not test cases executing in the Test Module it will be shut down. If there is test case running from the Test Module this method returns KErrInUse. If the Test Module specified by aTestModule is not loaded this method returns KErrNotFound.

Parameters

const TName & aTestModule

SetAttribute(TAttribute, const TDesC &)

IMPORT_C TIntSetAttribute(TAttributeaAttribute,
const TDesC &aValue
)

Sets attributes to Test Framework

Parameters

TAttribute aAttribute
const TDesC & aValue