// Copyright (c) 2026 Progmasoft. // SPDX-License-Identifier: MPL-2.0 WITH AdditionRef-Progmasoft-Exception-2.0 #pragma once #include #include namespace Progmasoft::Catch3 { struct RunResult; /// Writes a run as JUnit XML without timestamps or global state, so the /// same run gives the same bytes. /// /// A failed test gets ``, a crash, timeout or infrastructure /// problem ``, and earlier failed attempts ``. A /// test that failed and then passed is a success with `` /// elements, the convention of Maven Surefire that Jenkins, GitLab and /// most CI dashboards read. Skipped, blocked and not-run tests are /// `` with the reason as the message. class JUnitXmlWriter final { public: /// Returns false when the stream failed. [[nodiscard]] static bool Write(const RunResult &run, std::ostream &output); [[nodiscard]] static std::string ToString(const RunResult &run); }; } // namespace Progmasoft::Catch3