Aller au contenu
Bienvenue sur la nouvelle documentation de CppUtils !

Namespace: CppUtils::UnitTest::JUnit

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.

ParamètreDescription
suitesSpan of recorded test suites.
runNameTest run suite name attribute (defaults to “CppUtils Unit Tests”).
totalDurationTotal wall-clock duration of the test run.

Retourne : 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.

ParamètreDescription
filePathOutput file destination path.
suitesSpan of recorded test suites with their test cases and execution metrics.
totalDurationTotal wall-clock duration of the test run.