CTestModuleBase Class Reference
class CTestModuleBase : public CBase
|
Public Member Functions
|
|
CTestModuleBase
()
|
|
~CTestModuleBase
()
|
TInt
|
GetTestCasesL
(const
TFileName
&,
RPointerArray
<
TTestCaseInfo
> &)
|
TInt
|
InitL
(
TFileName
&,
TBool
)
|
void
|
OOMHandleWarningL
(const
TFileName
&, const ,
TInt
&)
|
void
|
OOMTestFinalizeL
(const
TFileName
&, const )
|
void
|
OOMTestInitializeL
(const
TFileName
&, const )
|
TBool
|
OOMTestQueryL
(const
TFileName
&, const ,
TOOMFailureType
&,
TInt
&,
TInt
&)
|
TInt
|
RunTestCaseL
(const
TInt
, const
TFileName
&,
TTestResult
&)
|
CTestModuleIf
&
|
TestModuleIf
()
|
TVersion
|
Version
()
|
Constructor & Destructor Documentation
CTestModuleBase()
CTestModuleBase
|
(
|
)
|
[inline]
|
~CTestModuleBase()
~CTestModuleBase
|
(
|
)
|
[inline, virtual]
|
Member Functions Documentation
GetTestCasesL(const TFileName &, RPointerArray< TTestCaseInfo > &)
Test cases are inquired from the Test Module by calling GetTestCasesL. Test cases may be read from the testcase file specified by aTestCaseFile or they can be e.g. hardcoded to testmodule. If the Test Module does not use testcase files for test case definition it does not use aTestCaseFile parameter. Test cases are appended to RPointerArray<TTestCaseInfo> that is a list consisting of several
TTestCaseInfo
objects. The STIF Test Framework will be the owner of the objects stored to
RPointerArray
after the GetTestCasesL has appended them to the list and it does the memory deallocation. This method is pure virtual and the Test Module must implement it.
InitL(TFileName &, TBool)
InitL is used to initialize the Test Module. The Test Modules may use the initialization file to read parameters for Test Module initialization but they can also have their own configure file or some other routine to initialize themselves. This method is virtual and it is not mandatory to implement it to Test Module.
OOMHandleWarningL(const TFileName &, const, TInt &)
void
|
OOMHandleWarningL
|
(
|
const
TFileName
&
|
,
|
|
const
|
TInt,
|
|
TInt
&
|
|
|
)
|
[inline, virtual]
|
Used in OOM testing only. Provides a way to the derived TestModule to handle warnings related to non-leaving or TRAPped allocations.
In some cases the allocation should be skipped, either due to problems in the OS code or components used by the code being tested, or even inside the tested components which are implemented this way on purpose (by design), so it is important to give the tester a way to bypass allocation failures.
This method is virtual and will be implemented if test case is to be executed using OOM conditions.
OOMTestFinalizeL(const TFileName &, const)
void
|
OOMTestFinalizeL
|
(
|
const
TFileName
&
|
,
|
|
const
|
TInt
|
|
)
|
[inline, virtual]
|
Used to perform the test environment cleanup for a particular OOM test case.
This method is virtual and will be implemented if test case is to be executed using OOM conditions.
OOMTestInitializeL(const TFileName &, const)
void
|
OOMTestInitializeL
|
(
|
const
TFileName
&
|
,
|
|
const
|
TInt
|
|
)
|
[inline, virtual]
|
Used to perform the test environment setup for a particular OOM test case. The Test Modules may use the initialization file to read parameters for Test Module initialization but they can also have their own configure file or some other routine to initialize themselves.
This method is virtual and will be implemented if test case is to be executed using OOM conditions.
OOMTestQueryL(const TFileName &, const, TOOMFailureType &, TInt &, TInt &)
Used to check if a particular Test Case should be run in OOM conditions and which memory allocations should fail. Method returns ETrue if test is should run in OOM conditions, EFalse otherwise.
This method is virtual and will be implemented if test case is to be executed using OOM conditions.
RunTestCaseL(const TInt, const TFileName &, TTestResult &)
RunTestCaseL is used to run an individual test case specified by aCaseNumber and aTestCaseFile (optional). This method is synchronous and test case result is returned as reference parameter aResult value. The function shall return KErrNone if case is started succesfully. If test case is not available (i.e invalid testcase file or or case number), then function shall return KErrNotFound. In other error situations another Symbian error code is returned. This method is pure virtual and the Test Module must implement it.
TestModuleIf()
TestModuleIf returns the handle to the
CTestModuleIf
interface. This is an utility function that can be used if the upper layer interface is needed to be used. This method must not be called from the constructor of Test Module that derives the
CTestModuleBase
.
Version()
Returns the API version which this test module complies. Test Framework uses this function to verify that loaded module can be used in current framework release.
Note that this function must always be the very first function that is defined in
CTestModuleBase
.
Member Enumerations Documentation
Member Data Documentation
CTestModuleIf * iTestModuleIf
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.