UTPP
Loading...
Searching...
No Matches
UnitTest::ReporterXml Class Reference

A Reporter that generates XML formatted results similar to NUnit. More...

#include <reporter_xml.h>

Inheritance diagram for UnitTest::ReporterXml:
UnitTest::ReporterDeferred UnitTest::Reporter

Public Member Functions

 ReporterXml (std::ostream &ostream=std::cout)
 
int Summary () override
 Generate XML report.
 
void Clear () override
 Reset all statistics.
 
- Public Member Functions inherited from UnitTest::ReporterDeferred
void SuiteStart (const TestSuite &suite) override
 
void TestStart (const Test &test) override
 
void ReportFailure (const Failure &failure) override
 
void TestFinish (const Test &test) override
 
- Public Member Functions inherited from UnitTest::Reporter
void SetTrace (bool on_off)
 Controls test tracing feature.
 
virtual int SuiteFinish (const TestSuite &suite)
 Invoked at the end of a test suite.
 

Protected Member Functions

void BeginTest (const ReporterDeferred::TestResult &result)
 
void AddFailure (const ReporterDeferred::TestResult &result)
 
void EndTest (const ReporterDeferred::TestResult &result)
 

Additional Inherited Members

- Protected Attributes inherited from UnitTest::ReporterDeferred
std::deque< TestResultresults
 Results of all tests.
 
- Protected Attributes inherited from UnitTest::Reporter
int suite_test_count
 number of tests in suite
 
int suite_failed_count
 number of failed tests in suite
 
int suite_failures_count
 number of failures in suite
 
int suite_time_msec
 total suite running time in milliseconds
 
int total_test_count
 total number of tests
 
int total_failed_count
 total number of failed tests
 
int total_failures_count
 total number of failures
 
int total_time_msec
 total running time in milliseconds
 
int suites_count
 number of suites ran
 
bool trace
 true if tracing is enabled
 

Detailed Description

A Reporter that generates XML formatted results similar to NUnit.

Constructor & Destructor Documentation

◆ ReporterXml()

UnitTest::ReporterXml::ReporterXml ( std::ostream & ostream = std::cout)
inlineexplicit

Constructor.

Parameters
ostreamOutput stream that will contain XML formatted results

Member Function Documentation

◆ Clear()

void UnitTest::ReporterXml::Clear ( )
inlineoverridevirtual

Reset all statistics.

Reimplemented from UnitTest::ReporterDeferred.

◆ Summary()

int UnitTest::ReporterXml::Summary ( )
inlineoverridevirtual

Generate XML report.

Reimplemented from UnitTest::Reporter.


The documentation for this class was generated from the following file: