20#ifndef ORES_TESTING_LOGGING_LISTENER_HPP
21#define ORES_TESTING_LOGGING_LISTENER_HPP
23#include <catch2/catch_test_case_info.hpp>
24#include <catch2/reporters/catch_reporter_event_listener.hpp>
25#include "ores.utility/log/lifecycle_manager.hpp"
70 using Catch::EventListenerBase::EventListenerBase;
72 void testRunStarting(Catch::TestRunInfo
const& testRunInfo)
override;
73 void testRunEnded(Catch::TestRunStats
const& testRunStats)
override;
74 void testCaseStarting(Catch::TestCaseInfo
const& testInfo)
override;
75 void testCaseEnded(Catch::TestCaseStats
const& testCaseStats)
override;
76 void assertionEnded(Catch::AssertionStats
const& assertionStats)
override;
77 void sectionStarting(Catch::SectionInfo
const& sectionInfo)
override;
78 void sectionEnded(Catch::SectionStats
const& sectionStats)
override;
81 std::shared_ptr<utility::log::lifecycle_manager> lifecycle_manager_;
Testing infrastructure common to all test projects.
Definition database_helper.hpp:27
Catch2 event listener that sets up logging for each test case and logs all test events to Boost....
Definition logging_listener.hpp:48
std::string extract_module_name()
Extracts the module name from the test binary name.
Definition logging_listener.cpp:89
static void set_test_module_name(const std::string &module_name)
Sets the test module name from the main function.
Definition logging_listener.cpp:93
std::string extract_suite_name(const Catch::TestCaseInfo &testInfo)
Extracts the first tag from a Catch2 test case as the suite name.
Definition logging_listener.cpp:75