CTestModuleIf Class Reference
class CTestModuleIf : public CBase |
Public Member Functions |
---|
TInt
| AddInterferenceThread(RThread) |
IMPORT_C TInt | CancelEvent(TEventIf &, TRequestStatus *) |
IMPORT_C TInt | CheckAllowResult(TInt) |
TInt
| Command(TCommand, const TDesC8 &) |
IMPORT_C TInt | Event(TEventIf &) |
IMPORT_C void | Event(TEventIf &, TRequestStatus &) |
IMPORT_C TInt | GetMeasurementOptions(TInt &) |
IMPORT_C TInt | GetStoredState(TInt &, TName &) |
IMPORT_C const TDesC & | GetTestCaseArguments() |
IMPORT_C void | GetTestCaseTitleL(TDes &) |
IMPORT_C CUiEnvProxy * | GetUiEnvProxy() |
TInt
| HandleMeasurementProcess(CSTIFTestMeasurement::TStifMeasurementStruct) |
IMPORT_C CTestModuleIf * | NewL(CTestThreadContainer *, CTestModuleBase *) |
IMPORT_C void | Printf(const TInt, const TDesC &, TRefByValue< const TDesC >, ...) |
IMPORT_C TInt | Reboot(TInt) |
IMPORT_C void | RemoteReceive(TDes &, TRequestStatus &) |
IMPORT_C void | RemoteReceiveCancel() |
IMPORT_C TInt | RemoteSend(const TDesC &) |
TInt
| RemoveInterferenceThread(RThread) |
IMPORT_C TInt | ResetAllowResult() |
IMPORT_C TInt | SendTestModuleVersion(TVersion, TFileName) |
IMPORT_C TInt | SendTestModuleVersion(TVersion &, const TDesC &, TBool) |
IMPORT_C TInt | SetAllowResult(TInt) |
IMPORT_C TInt | SetBehavior(TTestBehavior, TAny *) |
IMPORT_C void | SetExitReason(const CTestModuleIf::TExitReason, const TInt) |
IMPORT_C TInt | StifMacroError(TInt, const TText8 *, const char *, TInt, TInt, TInt, TInt, TInt, TInt, TInt) |
IMPORT_C TInt | StopExecution(TStopExecutionType, TInt) |
IMPORT_C TInt | StoreState(TInt, TName &) |
IMPORT_C TBool | UITesting() |
Public Member Enumerations |
---|
enum | TExitReason { ENormal, EPanic, EException } |
enum | TRebootType { EDefaultReset = 0, EKernelReset, EDeviceReset0 = 100, EDeviceReset1, EDeviceReset2, EDeviceReset3, EDeviceReset4, EDeviceReset5 } |
enum | TTestBehavior { ETestLeaksMem = 0x00000001, ETestLeaksRequests = 0x00000002, ETestLeaksHandles = 0x00000004, EOOMDisableLeakChecks = 0x00000008 } |
Constructor & Destructor Documentation
CTestModuleIf(CTestThreadContainer *)
~CTestModuleIf()
~CTestModuleIf | ( | ) | [private] |
Member Functions Documentation
AddInterferenceThread(RThread)
TInt
| AddInterferenceThread | ( | RThread | aSTIFTestInterference | ) | |
Add thread handle to Array. Via array can handle test interference thread's kill in panic etc. cases
CancelEvent(TEventIf &, TRequestStatus *)
Cancel asynchronous event command.
CheckAllowResult(TInt)
IMPORT_C TInt | CheckAllowResult | ( | TInt | aResult | ) | |
This is mainly used by STIF's TAL-TA5L macros internally. Check is macros result allowed result.
Command(TCommand, const TDesC8 &)
Command function is used to send command to test engine. It was created to provide possibility to kill test case by itself.
ConstructL(CTestModuleBase *)
By default Symbian OS constructor is private.
Event(TEventIf &)
Event function is used to control and use the event system. TEvent &aEvent encapsulates the request type and the event name, see StifTestEventInterface.h for more information. This method is implemented in Test Module Server and the Test Module can call it to control the event system.
Event(TEventIf &, TRequestStatus &)
Asynchronous overload function for the previous. Only one asynchronous Event call can be active concurrently. Second concurrent call will block until first one is completed.
GetMeasurementOptions(TInt &)
IMPORT_C TInt | GetMeasurementOptions | ( | TInt & | aOptions | ) | |
Get measurement option(s) given from initialization file etc.
GetStoredState(TInt &, TName &)
Get state after reboot (stored with StoreState).
GetTestCaseArguments()
IMPORT_C const TDesC & | GetTestCaseArguments | ( | ) | const |
Get test case execution arguments
GetTestCaseTitleL(TDes &)
IMPORT_C void | GetTestCaseTitleL | ( | TDes & | aTestCaseTitle | ) | |
GetTestCaseTitleL function is used to obtain test case title.
GetUiEnvProxy()
IMPORT_C CUiEnvProxy * | GetUiEnvProxy | ( | ) | |
HandleMeasurementProcess(CSTIFTestMeasurement::TStifMeasurementStruct)
With this can be stored information about test measurement to TestServer space.
IsServerAlive()
TBool
| IsServerAlive | ( | ) | [private] |
Check that server is alive.
NewL(CTestThreadContainer *, CTestModuleBase *)
Printf(const TInt, const TDesC &, TRefByValue< const TDesC >, ...)
Printf is used to provide different information up to the UI that can be then printed e.g. to the Console Screen. The definition of data to be printed is copied to aDefinition. The aPriority tells how important information is returned. The priority can be used in the UI to decide if the information received from the Test Module will be discarded or not in the different performance situations. The priority is also used in the Test Module server and in the Test Engine to queue the Printf responses. This method is implemented in Test Module Server and the Test Module can call it to provide printable information to the UI.
Reboot(TInt)
IMPORT_C TInt | Reboot | ( | TInt | aType = EDefaultReset | ) | |
Reboot device, StoreState MUST have been called.
Parameters
TInt aType = EDefaultReset | |
RemoteReceive(TDes &, TRequestStatus &)
RemoteReceive function is used receive remote control protocol messages.
RemoteReceiveCancel()
IMPORT_C void | RemoteReceiveCancel | ( | ) | |
RemoteReceiveCancel function is used cancel pending RemoteReceive.
RemoteSend(const TDesC &)
IMPORT_C TInt | RemoteSend | ( | const TDesC & | aRemoteMsg | ) | |
RemoteSend function is used send remote control protocol messages.
RemoveInterferenceThread(RThread)
TInt
| RemoveInterferenceThread | ( | RThread | aSTIFTestInterference | ) | |
Remove thread handle from Array.Test interference thread is stopped and killed successfully
ResetAllowResult()
IMPORT_C TInt | ResetAllowResult | ( | ) | |
Use with TAL, TA1L, TA2L, TA3L, TA4L and TA5L macros to reset allowed results. Reset allow result(s) given with SetAllowResult. In TestScripter cases this will be called automatically by STIF. Normal and Hardcoded cases this should be called by user.
SendTestModuleVersion(TVersion, TFileName)
SendTestModuleVersion method is used to pass version of test module to test engine
SendTestModuleVersion(TVersion &, const TDesC &, TBool)
SendTestModuleVersion method is used to pass version of test module to test engine. This version with 3 parameters were added because version with 2 parameters has arguments passed by value which is incorrect. So the third argument was added only to overload the method and enable test modules using "old" version (with 2 parameters) to work. Only this version (with three parameters) should be used.
SetAllowResult(TInt)
IMPORT_C TInt | SetAllowResult | ( | TInt | aResult | ) | |
Use with TAL, TA1L, TA2L, TA3L, TA4L and TA5L macros to allow results. Set test case allow result given by user. In TestScripter cases allow result can set by 'allownextresult' or 'allowerrorcodes' keywords. In Normal and Hardcoded test modules allow result can be set with this method, reset should be done with ResetAllowResult method.
SetBehavior(TTestBehavior, TAny *)
Set test case behavior, e.g. allow memory leak, handle leak etc.
SetExitReason(const CTestModuleIf::TExitReason, const TInt)
SetExitReason function is used to set different crash reasons to acceptable test case result. Only one exit reason can be set at time. When function is called again, previous exit reason is removed and new one is set to acceptable exit reason.
Function is typically used to accept test case panics as "passed" test cases.
Test case that panics or gets exception is set to passed if aExitReason parameter matches with exit reason and aExitCode matches with panic code or exception type.
StifMacroError(TInt, const TText8 *, const char *, TInt, TInt, TInt, TInt, TInt, TInt, TInt)
IMPORT_C TInt | StifMacroError | ( | TInt | aMacroType, |
| const TText8 * | aFile, |
| const char * | aFunction, |
| TInt | aLine, |
| TInt | aResult = 0, |
| TInt | aExpected1 = 0, |
| TInt | aExpected2 = 0, |
| TInt | aExpected3 = 0, |
| TInt | aExpected4 = 0, |
| TInt | aExpected5 = 0 |
| ) | |
This can be called from test module but it is recommended to use TL, T1L, T2L or T3L macro instead of this method. For more information see macro definitions above on this file.
StopExecution(TStopExecutionType, TInt)
StopExecution function is used to stop the execution of test case.
StoreState(TInt, TName &)
Store state before reboot. MUST be called before calling Reboot().
UITesting()
IMPORT_C TBool | UITesting | ( | ) | |
Checks if testserver supports UI testing
Member Enumerations Documentation
Enum TExitReason
Enumerators
ENormal | |
EPanic | |
EException | |
Enum TRebootType
Enumerators
EDefaultReset = 0 | |
EKernelReset | |
EDeviceReset0 = 100 | |
EDeviceReset1 | |
EDeviceReset2 | |
EDeviceReset3 | |
EDeviceReset4 | |
EDeviceReset5 | |
Enum TTestBehavior
Enumerators
ETestLeaksMem = 0x00000001 | |
ETestLeaksRequests = 0x00000002 | |
ETestLeaksHandles = 0x00000004 | |
EOOMDisableLeakChecks = 0x00000008 | |
Member Data Documentation
TInt
iAllowTestCaseResultsCount
TInt
| iAllowTestCaseResultsCount | [private] |
TBool
iIsRebootReady
TBool
| iIsRebootReady | [private] |
TInt
iStoreStateCounter
TInt
| iStoreStateCounter | [private] |
TInt
iTestCaseResults
TInt
| iTestCaseResults | [private] |
CTestThreadContainer * iTestExecution
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.