ADTF  3.18.2
ITestBenchabstract

This interface has to be implemented by the main test program. More...

Public Types

enum  tLogType { TEST_LOG_UNKNOWN = 0 , TEST_LOG_PASSED = 1 , TEST_LOG_FAILED = 2 }
 Enumeration values used as parameter in method Log() More...
 

Public Member Functions

virtual void * GetEnvironment ()=0
 
virtual tInt Initialize (tInt argc, const tChar *argv[])=0
 Initialize test bench. More...
 
virtual tInt RunTests ()=0
 Will run all tests. More...
 
virtual tInt Shutdown ()=0
 Shutdown of test bench. More...
 
virtual void RegisterTester (ITester *pTester)=0
 Registers a new tester at the test bench. More...
 
virtual void LogTestFunction (const tChar *strFunction)=0
 Logs test function. More...
 
virtual void Log (tInt nLogType, const tChar *strText, const tChar *strExpression, const tChar *strFile, tInt nLine, const tChar *strFunction=nullptr, const tChar *strMessage=nullptr)=0
 Generates log output. More...
 
virtual void LogStartFunction (tTestDoc *pDoc)=0
 Generate log output at start of function. More...
 
virtual void LogStopFunction (tTestDoc *pDoc)=0
 Generate log output at stop of function. More...
 
virtual void RegisterOutputter (ITestReportOutputter *pOutputter)=0
 Register test report outputer. More...
 
virtual tBool IsOK ()=0
 Returns OK state. More...
 
virtual tResult GetPluginDirs (A_UTILS_NS::cStringList &lstDirs)=0
 Returns the plugins dir. More...
 
virtual A_UTILS_NS::cFilename GetOutputDir ()=0
 Returns the tester output dir. More...
 
virtual A_UTILS_NS::cFilename GetWorkingDir ()=0
 Returns the tester working dir. More...
 

Detailed Description

This interface has to be implemented by the main test program.

Definition at line 171 of file testbench.h.

Member Enumeration Documentation

◆ tLogType

enum tLogType

Enumeration values used as parameter in method Log()

Enumerator
TEST_LOG_UNKNOWN 

unknown

TEST_LOG_PASSED 

log when passed

TEST_LOG_FAILED 

log when failed

Definition at line 177 of file testbench.h.

Member Function Documentation

◆ GetEnvironment()

virtual void* GetEnvironment ( )
pure virtual
Returns

◆ GetOutputDir()

virtual A_UTILS_NS::cFilename GetOutputDir ( )
pure virtual

Returns the tester output dir.

Returns
Path to output dir

◆ GetPluginDirs()

virtual tResult GetPluginDirs ( A_UTILS_NS::cStringList lstDirs)
pure virtual

Returns the plugins dir.

Parameters
lstDirs[out] List of plugin dirs
Returns
Standard result code

◆ GetWorkingDir()

virtual A_UTILS_NS::cFilename GetWorkingDir ( )
pure virtual

Returns the tester working dir.

Returns
Path to working dir

◆ Initialize()

virtual tInt Initialize ( tInt  argc,
const tChar argv[] 
)
pure virtual

Initialize test bench.

Parameters
argcCount of arguments
argvArray of pointers to arguments
Returns

◆ IsOK()

virtual tBool IsOK ( )
pure virtual

Returns OK state.

Returns
true if OK, false otherwise

◆ Log()

virtual void Log ( tInt  nLogType,
const tChar strText,
const tChar strExpression,
const tChar strFile,
tInt  nLine,
const tChar strFunction = nullptr,
const tChar strMessage = nullptr 
)
pure virtual

Generates log output.

Parameters
nLogTypeValues as defined in tLogType
strTextText to be logged
strExpressionExpression to be logged
strFileName of source file
nLineLine if code in source file
strFunctionName of function
strMessageUser defined message

◆ LogStartFunction()

virtual void LogStartFunction ( tTestDoc pDoc)
pure virtual

Generate log output at start of function.

Parameters
pDocPointer to test document

◆ LogStopFunction()

virtual void LogStopFunction ( tTestDoc pDoc)
pure virtual

Generate log output at stop of function.

Parameters
pDocPointer to test document

◆ LogTestFunction()

virtual void LogTestFunction ( const tChar strFunction)
pure virtual

Logs test function.

Parameters
strFunctionName of function

◆ RegisterOutputter()

virtual void RegisterOutputter ( ITestReportOutputter pOutputter)
pure virtual

Register test report outputer.

Parameters
pOutputterPointer to outputter

◆ RegisterTester()

virtual void RegisterTester ( ITester pTester)
pure virtual

Registers a new tester at the test bench.

Parameters
pTesterPointer to tester

◆ RunTests()

virtual tInt RunTests ( )
pure virtual

Will run all tests.

Returns
0 if successful

◆ Shutdown()

virtual tInt Shutdown ( )
pure virtual

Shutdown of test bench.

Returns
0 if successful