7 #ifndef _TEST_BENCH_INCLUDES_
8 #define _TEST_BENCH_INCLUDES_
100 OF_HideStatistics = 0x4
161 const tChar* strExpression,
162 const tChar* strFile,
164 const tChar* strFunction,
165 const tChar* strMessage) = 0;
179 TEST_LOG_UNKNOWN = 0,
234 const tChar* strText,
235 const tChar* strExpression,
236 const tChar* strFile,
238 const tChar* strFunction =
nullptr,
239 const tChar* strMessage =
nullptr) = 0;
303 const tChar* argv[]=
nullptr,
305 tInt nConsoleOutputterFlags=0,
307 tInt nFileOutputterFlags=0);
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
void tVoid
The tVoid is always the definition for the void (non-type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
A common result class usable as return value throughout.
This interface has to be implemented by the main test program.
virtual A_UTILS_NS::cFilename GetWorkingDir()=0
Returns the tester working dir.
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.
virtual A_UTILS_NS::cFilename GetOutputDir()=0
Returns the tester output dir.
virtual tBool IsOK()=0
Returns OK state.
virtual tInt Shutdown()=0
Shutdown of test bench.
virtual tInt Initialize(tInt argc, const tChar *argv[])=0
Initialize test bench.
virtual void RegisterOutputter(ITestReportOutputter *pOutputter)=0
Register test report outputer.
virtual tInt RunTests()=0
Will run all tests.
virtual void * GetEnvironment()=0
virtual void LogStopFunction(tTestDoc *pDoc)=0
Generate log output at stop of function.
virtual void LogStartFunction(tTestDoc *pDoc)=0
Generate log output at start of function.
virtual void LogTestFunction(const tChar *strFunction)=0
Logs test function.
virtual tResult GetPluginDirs(A_UTILS_NS::cStringList &lstDirs)=0
Returns the plugins dir.
virtual void RegisterTester(ITester *pTester)=0
Registers a new tester at the test bench.
This interface has to be implemented by the test report class.
virtual void writeResult(ITester *pTester, tBool bPassed, const tChar *strExpression, const tChar *strFile, tInt nLine, const tChar *strFunction, const tChar *strMessage)=0
Will be called to write the test result.
virtual void beginReport()=0
Will be called when report starts.
virtual void writeTestFunction(tTestDoc *pDoc)=0
Will be called when test case begins.
virtual ~ITestReportOutputter()
Desctructor.
virtual void beginTester(ITester *pTester)=0
Will be called when test begins.
virtual void setFlags(tInt nFlags)=0
Sets flags as specfied in enumeration tOutputterFlags.
virtual void endTester(ITester *pTester)=0
Will be called when test ends.
virtual void writeTestFunctionEnd(tTestDoc *pDoc)=0
Will be called when test case ends.
virtual void endReport()=0
Will be called when report ends.
This class is the base class of all test cases.
virtual tTestGroupDoc * getDoc()
virtual void run()
Will be called when the test has to be performed.
virtual void setUp()
Will be called at start of the run() method.
virtual const tChar * getClassName()
virtual void tearDown()
Will be called at end of the run() method.
This structure defines a test case.
const tChar * strUser
Test user.
const tChar * strShortDesc
Short description.
const tChar * strRequirements
Test requirements.
const tChar * strPassedIf
Which result passes the test.
const tChar * strTitle
Title of test document.
tBool bActive
Test active.
const tChar * strFile
Test file.
const tChar * strStrategy
Test strategy.
const tChar * strRemarks
Remarks for the test.
const tChar * strId
ID of test document.
This structure defines a group of test cases.
const tChar * strShortDesc
Test group short description.
const tChar * strRequirements
Test group requirements.
const tChar * strTitle
Test group title.
const tChar * strId
Test group ID.
tInt RunTestBench(tInt argc=0, const tChar *argv[]=nullptr, ITestReportOutputter *pConsoleOutputter=nullptr, tInt nConsoleOutputterFlags=0, ITestReportOutputter *pFileOutputter=nullptr, tInt nFileOutputterFlags=0)
This function will perform all tests defined in the module.
tVoid OutputDebugStringWrapper(const tChar *strMessage)
This function creates a debug message.
ITestBench * __get_testbench()
This function will return the pointer to the currently active test bench.
void tTestResult
Result type of test methods.