CTestManager Class Reference
class CTestManager : public CActive
|
Comments : Active object which launches all the tests which the TestController has discovered. Also, acts as an observer on each
CComponentTester
waiting for a Complete message to indicate the test has finished.
Constructor & Destructor Documentation
CTestManager(RPointerArray< CComponentInfo > *, CDataLogger &, MManagerObserver &, RTest *)
Intended Usage : Constructor
-
Since
-
7.0
Parameters
RPointerArray
<
CComponentInfo
> * aTestList
|
The list of tests to be launched by this CTestManager
|
CDataLogger
& aDataLogger
|
The file logging capability
|
MManagerObserver
& aObserver
|
The class to inform when all the tests are complete
|
RTest
* aRTest = NULL
|
Optional RTest object to use in check unit test results
|
~CTestManager()
Intended Usage : Standard destructor
-
Since
-
7.0
Member Functions Documentation
Complete(CComponentTester *, TInt)
Intended Usage : Callback from the
CComponentTester
being observed to indicate that it has completed a unit test
-
Since
-
7.0
-
Pre-condition
-
The specified unit test has been launched
-
Post-condition
-
If all unit tests are complete then the specified
CComponentTester
has been added to the Garbage list ready for deletion at the next opportunity, this will also unload the appropriate library. Otherwise launch the next unit test.
Parameters
CComponentTester
* aTester
|
The CComponentTester which is signalling
|
TInt
aUnitTestId
|
The Id of the completed unit test
|
ConstructL()
void
|
ConstructL
|
(
|
)
|
[protected]
|
Intended Usage : Second phase of safe two-phase construction method
-
Since
-
7.0
-
Pre-condition
-
First phase of construction is complete
-
Post-condition
-
Object is fully constructed and initialized
DoCancel()
void
|
DoCancel
|
(
|
)
|
[protected, virtual]
|
Intended Usage : Standard Active Object method used to cancel any outstanding requests Error Condition :
-
Since
-
7.0
-
Pre-condition
-
Object is fully constructed and initialised
-
Post-condition
-
Any outstanding requests have been cancelled.
NewL(RPointerArray< CComponentInfo > *, CDataLogger &, MManagerObserver &, RTest *)
Intended Usage : Standard two-phase construction which leaves nothing on the
CleanupStack
-
Since
-
7.0
-
Pre-condition
-
None
-
Post-condition
-
Nothing is left on the
CleanupStack
Parameters
RPointerArray
<
CComponentInfo
> * aTestList
|
List of tests available to be performed
|
CDataLogger
& aDataLogger
|
Provides the file logging functionality
|
MManagerObserver
& aObserver
|
The object to inform when all the tests are complete
|
RTest
* aRTest = NULL
|
Optional RTest object to use in check unit test results
|
RunError(TInt)
TInt
|
RunError
|
(
|
TInt
|
aErrorCode
|
)
|
[protected, virtual]
|
Intended Usage : Handles the situation where the RunL leaves. RunL will only leave through a leave from TestComponentL, this will occur if the test to be run fails to construct. Error Condition : None
-
Since
-
7.0
-
Pre-condition
-
This object is fully constructed and initialized
-
Post-condition
-
The test which failed to construct is cleaned up.
Parameters
TInt
aErrorCode
|
The error code which RunL left with.
|
RunL()
void
|
RunL
|
(
|
)
|
[protected, virtual]
|
Intended Usage : Used to launch each test, in turn, and then to stop the active scheduler when all tests have completed
-
Since
-
7.0
-
Pre-condition
-
None
-
Post-condition
-
Initially each run of
RunL()
will result in a ComponentTester being created and launched. Once all the tests have launched
RunL()
will only be called at completion to stop the active scheduler.
RunTests(RPointerArray< TTestInfo > *)
Intended Usage : Prepare for the test run. Error Condition :
-
Since
-
7.0
-
Pre-condition
-
None
-
Post-condition
-
This is active and awaiting call to
RunL()
by the active scheduler
StartedTests()
TBool
|
StartedTests
|
(
|
)
|
const
|
Intended Usage : Returns a flag indicating whether any tests have been started yet
-
Since
-
7.0
-
Pre-condition
-
This object is fully constructed
TestComponentL(TInt)
void
|
TestComponentL
|
(
|
TInt
|
aComponentIndex
|
)
|
[protected]
|
Intended Usage : Loads the appropriate library and test the specified component
-
Since
-
7.0
-
Pre-condition
-
Object is fully constructed and initialised
-
Post-condition
-
Specified component test has been activated to run
Parameters
TInt
aComponentIndex
|
The zero base index of the component to test
|
Member Data Documentation
TBool
iAmStopping
TBool
|
iAmStopping
|
[protected]
|
Flag indicating that all tests have completed
TInt
iCurrentTestLoad
TInt
|
iCurrentTestLoad
|
[protected]
|
The index (in iTestList) of the test which is to be loaded next
CComponentTester * iCurrentTester
The test which is currently being run
CDataLogger & iDataLogger
The test logging mechanism
MManagerObserver & iObserver
The observer to inform when all tests are complete
RTest * iRTest
RTest
*
|
iRTest
|
[protected]
|
Optional reference to the
RTest
object used in the EXE test harness code which kicked off this test framework
RPointerArray< CComponentInfo > * iTestList
List of all the test to be run
RPointerArray< TTestInfo > * iTestsToRun
List of the tests to be run, NULL means run all tests
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.