Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
hayai::JUnitXmlOutputter Class Reference

JUnit-compatible XML outputter. More...

#include <hayai_junit_xml_outputter.hpp>

Inheritance diagram for hayai::JUnitXmlOutputter:
Inheritance graph
[legend]

List of all members.

Classes

class  TestCase
 Test case. More...

Public Member Functions

virtual void Begin (const std::size_t &enabledCount, const std::size_t &disabledCount)
 Begin benchmarking.
virtual void BeginTest (const std::string &fixtureName, const std::string &testName, const TestParametersDescriptor &parameters, const std::size_t &runsCount, const std::size_t &iterationsCount)
 Begin benchmark test run.
virtual void End (const std::size_t &executedCount, const std::size_t &disabledCount)
 End benchmarking.
virtual void EndTest (const std::string &fixtureName, const std::string &testName, const TestParametersDescriptor &parameters, const TestResult &result)
 End benchmark test run.
 JUnitXmlOutputter (std::ostream &stream)
 Initialize outputter.
virtual void SkipDisabledTest (const std::string &fixtureName, const std::string &testName, const TestParametersDescriptor &parameters, const std::size_t &runsCount, const std::size_t &iterationsCount)
 Skip disabled benchmark test run.

Private Types

typedef std::map< std::string,
std::vector< TestCase > > 
TestSuiteMap
 Test suite map.

Private Member Functions

void WriteEscapedString (const std::string &str)
 Write an escaped string.

Private Attributes

std::ostream & _stream
TestSuiteMap _testSuites

Detailed Description

JUnit-compatible XML outputter.

Definition at line 15 of file hayai_junit_xml_outputter.hpp.


Member Typedef Documentation

typedef std::map<std::string, std::vector<TestCase> > hayai::JUnitXmlOutputter::TestSuiteMap [private]

Test suite map.

Definition at line 57 of file hayai_junit_xml_outputter.hpp.


Constructor & Destructor Documentation

hayai::JUnitXmlOutputter::JUnitXmlOutputter ( std::ostream &  stream) [inline]

Initialize outputter.

Parameters:
streamOutput stream. Must exist for the entire duration of the outputter's use.

Definition at line 63 of file hayai_junit_xml_outputter.hpp.


Member Function Documentation

virtual void hayai::JUnitXmlOutputter::Begin ( const std::size_t &  enabledCount,
const std::size_t &  disabledCount 
) [inline, virtual]

Begin benchmarking.

The total number of benchmarks registred is the sum of the two counts passed to the outputter.

Parameters:
enabledCountNumber of benchmarks to be executed.
disabledCountNumber of disabled benchmarks to be skipped.

Implements hayai::Outputter.

Definition at line 70 of file hayai_junit_xml_outputter.hpp.

virtual void hayai::JUnitXmlOutputter::BeginTest ( const std::string &  fixtureName,
const std::string &  testName,
const TestParametersDescriptor parameters,
const std::size_t &  runsCount,
const std::size_t &  iterationsCount 
) [inline, virtual]

Begin benchmark test run.

Parameters:
fixtureNameFixture name.
testNameTest name.
parametersTest parameter description.
runsCountNumber of runs to be executed.
iterationsCountNumber of iterations per run.

Implements hayai::Outputter.

Definition at line 126 of file hayai_junit_xml_outputter.hpp.

virtual void hayai::JUnitXmlOutputter::End ( const std::size_t &  executedCount,
const std::size_t &  disabledCount 
) [inline, virtual]

End benchmarking.

Parameters:
executedCountNumber of benchmarks that have been executed.
disabledCountNumber of benchmarks that have been skipped because they are disabled.

Implements hayai::Outputter.

Definition at line 78 of file hayai_junit_xml_outputter.hpp.

virtual void hayai::JUnitXmlOutputter::EndTest ( const std::string &  fixtureName,
const std::string &  testName,
const TestParametersDescriptor parameters,
const TestResult result 
) [inline, virtual]

End benchmark test run.

Parameters:
fixtureNameFixture name.
testNameTest name.
parametersTest parameter description.
resultTest result.

Implements hayai::Outputter.

Definition at line 154 of file hayai_junit_xml_outputter.hpp.

virtual void hayai::JUnitXmlOutputter::SkipDisabledTest ( const std::string &  fixtureName,
const std::string &  testName,
const TestParametersDescriptor parameters,
const std::size_t &  runsCount,
const std::size_t &  iterationsCount 
) [inline, virtual]

Skip disabled benchmark test run.

Parameters:
fixtureNameFixture name.
testNameTest name.
parametersTest parameter description.
runsCountNumber of runs to be executed.
iterationsCountNumber of iterations per run.

Implements hayai::Outputter.

Definition at line 140 of file hayai_junit_xml_outputter.hpp.

void hayai::JUnitXmlOutputter::WriteEscapedString ( const std::string &  str) [inline, private]

Write an escaped string.

The escaping is currently very rudimentary and assumes that names, parameters etc. are ASCII.

Parameters:
strString to write.

Definition at line 219 of file hayai_junit_xml_outputter.hpp.


Member Data Documentation

std::ostream& hayai::JUnitXmlOutputter::_stream [private]

Definition at line 257 of file hayai_junit_xml_outputter.hpp.

Definition at line 258 of file hayai_junit_xml_outputter.hpp.


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


hayai
Author(s): Nick Bruun
autogenerated on Thu Jun 6 2019 18:13:44