Welcome to the new CppUtils documentation!
Functions & utilities
FUNCTIONSNamespace: CppUtils::UnitTest::JUnit
Public functions
Section titled “Public functions”auto generateXml(std::span<const RecordedTestSuite> suites, std::string_view runName="CppUtils Unit Tests", std::chrono::nanoseconds totalDuration={}) -> std::string;Generates a standard JUnit XML document string from structured test run data.
| Parameter | Description |
|---|---|
suites | Span of recorded test suites. |
runName | Test run suite name attribute (defaults to “CppUtils Unit Tests”). |
totalDuration | Total wall-clock duration of the test run. |
Returns: Formatted XML document.
auto writeJUnitXmlReport(const std::filesystem::path& filePath, std::span<const RecordedTestSuite> suites, std::chrono::nanoseconds totalDuration={}) -> void;Serializes test execution results to a standard JUnit XML report file.
| Parameter | Description |
|---|---|
filePath | Output file destination path. |
suites | Span of recorded test suites with their test cases and execution metrics. |
totalDuration | Total wall-clock duration of the test run. |