xUnit++ / xUnit++.Utility / XmlReporter.h

#ifndef XMLREPORTER_H_
#define XMLREPORTER_H_

#include <map>
#include "xUnit++/IOutput.h"

namespace xUnitpp { namespace Utilities
{

class XmlReporter : public IOutput
{
public:
    XmlReporter(const std::string &filename);

    virtual void _stdcall ReportStart(const ITestDetails &td) override;
    virtual void _stdcall ReportEvent(const ITestDetails &testDetails, const ITestEvent &evt) override;
    virtual void _stdcall ReportSkip(const ITestDetails &testDetails, const char *reason) override;
    virtual void _stdcall ReportFinish(const ITestDetails &testDetails, long long nsTaken) override;
    virtual void _stdcall ReportAllTestsComplete(size_t testCount, size_t skipped, size_t failureCount, long long nsTotal) override;

public:
    struct SuiteResult;

private:
    std::string filename;
    std::map<std::string, SuiteResult> suiteResults;
};

}}

#endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.