ADTF  3.18.3
cPCBJunitReportOutputter

Class which is used to create XML file in JUNIT format. More...

Inheritance diagram for cPCBJunitReportOutputter:
[legend]

Public Member Functions

 cPCBJunitReportOutputter (const tChar *strFile, tInt nBuild, A_UTILS_NS::cCommandLine &oCmdLine)
 This class is used to generate the XML file in Junit format. More...
 
void setFlags (int nFlags)
 Sets flags as specfied in enumeration tOutputterFlags. More...
 
void beginReport ()
 Will be called when report starts.
 
void endReport ()
 Will be called when report ends.
 
void beginTester (ITester *pTester)
 Will be called when test begins. More...
 
void endTester (ITester *pTester)
 Will be called when test ends. More...
 
void writeTestFunction (tTestDoc *pDoc)
 Will be called when test case begins. More...
 
void writeTestFunctionEnd (tTestDoc *pDoc)
 Will be called when test case ends. More...
 
void writeResult (ITester *pTester, bool bPassed, const char *strExpression, const char *strFile, int nLine, const char *strFunction, const char *strMessage)
 Will be called when the result is wriiten to the file. More...
 
- Public Member Functions inherited from ITestReportOutputter
virtual ~ITestReportOutputter ()
 Desctructor.
 

Protected Attributes

A_UTILS_NS::cFilename m_strFile
 The object to the class Filename used as Test file.
 
tInt m_nFlags
 It is the flag value.
 
tInt m_nBuild
 It the build number.
 
A_UTILS_NS::cDOM m_oDOM
 This implements a XML parser which can be used to read in XML files.
 
A_UTILS_NS::cDOMElementm_pCurrentSuite
 It is a pointer to the current testgroup.
 
A_UTILS_NS::cDOMElementm_pCurrentTest
 It is a pointer to the current test.
 
A_UTILS_NS::cDOMElementskipped
 It is a pointer to the tests that are not done.
 
A_UTILS_NS::cString m_strCurrentSuite
 The variable represents the name of the CurrentSuite.
 
tBool m_bRedirect
 tTrue if "noredirect" from cmdLine is disabled
 
int m_nOriginalStdOut
 STDOUT_FILENO.
 
int m_nOriginalStdErr
 STDERR_FILENO.
 
tBool m_bError
 error state
 
FILE * m_hRedirectedFileHandle = nullptr
 

Private Member Functions

A_UTILS_NS::cString NormalizeToHTML (const A_UTILS_NS::cString &strInput)
 

Additional Inherited Members

- Public Types inherited from ITestReportOutputter
enum  tOutputterFlags { OF_Default = 0x0 , OF_HidePassed = 0x1 , OF_HideFailed = 0x2 , OF_HideStatistics = 0x4 }
 Enumeration values used as parameter in method setFlags() More...
 

Detailed Description

Class which is used to create XML file in JUNIT format.

Definition at line 13 of file pcbjunitoutputter.h.

Constructor & Destructor Documentation

◆ cPCBJunitReportOutputter()

cPCBJunitReportOutputter ( const tChar strFile,
tInt  nBuild,
A_UTILS_NS::cCommandLine oCmdLine 
)

This class is used to generate the XML file in Junit format.

Parameters
strFile[in] The test file
nBuild[in] Build number
oCmdLine[in] Command line parameter

Member Function Documentation

◆ beginTester()

void beginTester ( ITester pTester)
virtual

Will be called when test begins.

Parameters
pTester[in] Pointer to object of type ITester

Implements ITestReportOutputter.

◆ endTester()

void endTester ( ITester pTester)
virtual

Will be called when test ends.

Parameters
pTester[in] Pointer to object of type ITester

Implements ITestReportOutputter.

◆ setFlags()

void setFlags ( int  nFlags)
virtual

Sets flags as specfied in enumeration tOutputterFlags.

Parameters
nFlags[in] Bitwise combination of values from tOutputterFlags

Implements ITestReportOutputter.

◆ writeResult()

void writeResult ( ITester pTester,
bool  bPassed,
const char *  strExpression,
const char *  strFile,
int  nLine,
const char *  strFunction,
const char *  strMessage 
)
virtual

Will be called when the result is wriiten to the file.

Parameters
pTester[in] Pointer to object of type ITester
bPassed[in] True when test passed, false otherwise
strExpression[in] Textual representation of test case
strFile[in] Name of test source file
nLine[in] Line number in test source file
strFunction[in] Name of test function
strMessage[in] User defined message

Implements ITestReportOutputter.

◆ writeTestFunction()

void writeTestFunction ( tTestDoc pDoc)
virtual

Will be called when test case begins.

Parameters
pDoc[in] Pointer to test case structure

Implements ITestReportOutputter.

◆ writeTestFunctionEnd()

void writeTestFunctionEnd ( tTestDoc pDoc)
virtual

Will be called when test case ends.

Parameters
pDoc[in] Pointer to test case structure

Implements ITestReportOutputter.