11#include <unordered_map>
31 std::filesystem::path
file;
55[[nodiscard]] std::unordered_map<std::string, std::string>
61[[nodiscard]] std::string
TestNameKey(std::string_view name);
72using ScanProgress = std::function<bool(std::size_t done, std::size_t total)>;
83[[nodiscard]] std::vector<TestRunEntry>
ScanResultsFolder(
const std::filesystem::path& folder,
95[[nodiscard]] std::vector<FailureGroup>
GroupFailures(
const std::vector<TestRunEntry>& entries);
Definition ActorDiscoverer.cpp:13
constexpr std::string_view kMergedLogSuffix
File-name suffix of a safeAPI merged test log inside a results folder.
Definition TestRunIndex.hpp:18
std::vector< TestRunEntry > ScanResultsFolder(const fs::path &folder, const ScanProgress &progress)
Definition TestRunIndex.cpp:342
std::unordered_map< std::string, std::string > ReadRobotFailures(const fs::path &folder)
Definition TestRunIndex.cpp:287
std::string TestNameKey(std::string_view name)
Definition TestRunIndex.cpp:298
TestRunEntry ReadTestLogSummary(const fs::path &file)
Definition TestRunIndex.cpp:203
std::function< bool(std::size_t done, std::size_t total)> ScanProgress
Called after each scanned log with (done, total); return false to cancel.
Definition TestRunIndex.hpp:72
FailureSource
Where TestRunEntry::failureMessage came from.
Definition TestRunIndex.hpp:22
@ RobotXml
xunit.xml <failure message> or output.xml test status text
@ None
no message found (or the test did not fail)
@ StepFail
the decisive STEP_FAIL of the log (see BuildTestOutline)
std::vector< FailureGroup > GroupFailures(const std::vector< TestRunEntry > &entries)
Definition TestRunIndex.cpp:393
std::string FindDecisiveFailureMessage(const fs::path &file)
Definition TestRunIndex.cpp:248
std::string NormalizeFailureMessage(std::string_view message)
Definition TestRunIndex.cpp:326
TestVerdict
Definition TestOutline.hpp:57
std::string CollapseWhitespace(std::string_view text)
Collapses whitespace runs (including newlines) to one space and trims.
Definition TestRunIndex.cpp:307
Failing tests sharing one normalised message.
Definition TestRunIndex.hpp:88
std::vector< std::size_t > members
indices into the entries, in entry order
Definition TestRunIndex.hpp:90
std::string message
message of the first member
Definition TestRunIndex.hpp:89
One test of a results folder, read without loading the whole log.
Definition TestRunIndex.hpp:30
FailureSource failureSource
Definition TestRunIndex.hpp:38
std::string failureMessage
FAIL only, on one line (whitespace collapsed)
Definition TestRunIndex.hpp:37
TestVerdict verdict
header Status
Definition TestRunIndex.hpp:33
std::int64_t durationUs
last − first event timestamp; -1 = unknown
Definition TestRunIndex.hpp:35
std::int64_t entries
header Entries; -1 = absent
Definition TestRunIndex.hpp:36
std::filesystem::path file
Definition TestRunIndex.hpp:31
std::string timestamp
header Timestamp, else the first event's timestamp
Definition TestRunIndex.hpp:34
std::string testName
header Test Case, else the file name without the suffix
Definition TestRunIndex.hpp:32