|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
Namespaces | |
| namespace | anonymous_namespace{ActorDiscoverer.cpp} |
| namespace | anonymous_namespace{SequenceMessages.cpp} |
| namespace | anonymous_namespace{TestOutline.cpp} |
| namespace | anonymous_namespace{TestRunIndex.cpp} |
Classes | |
| class | ActorDiscoverer |
| struct | ActorDiscoveryResult |
| struct | ExchangePattern |
| Describes how actor-to-actor message flow can be read from the log events. More... | |
| struct | FailureGroup |
| Failing tests sharing one normalised message. More... | |
| struct | SequenceMessage |
| One arrow of a sequence diagram: a message from one actor to another. More... | |
| struct | TestMarkerRules |
| struct | TestOutline |
| struct | TestRunEntry |
| One test of a results folder, read without loading the whole log. More... | |
| struct | TestStep |
Typedefs | |
| using | ScanProgress = std::function< bool(std::size_t done, std::size_t total)> |
| Called after each scanned log with (done, total); return false to cancel. | |
Enumerations | |
| enum class | ExchangeMode { Pair , DirectionField , ReceiverOnly , SenderOnly , PatternField } |
| How actor send/receive relationships are encoded in the log. More... | |
| enum class | StepStatus { Passed , Recovered , Failed , NotRun } |
| enum class | TestVerdict { Unknown , Pass , Fail } |
| enum class | FailureSource { None , StepFail , RobotXml } |
| Where TestRunEntry::failureMessage came from. More... | |
Functions | |
| static int | ScoreAgainst (const std::string &lower, const std::vector< std::string > &words) |
| bool | IsPlaceholderActor (std::string_view name) |
| std::vector< std::string > | SplitActorList (std::string_view value) |
| std::vector< SequenceMessage > | CollectSequenceMessages (db::EventsContainer &events, const ExchangePattern &pattern, std::size_t limit) |
| std::optional< std::int64_t > | ParseIsoMicros (std::string_view ts) |
| TestOutline | BuildTestOutline (db::EventsContainer &events, const TestMarkerRules &r) |
| TestRunEntry | ReadTestLogSummary (const fs::path &file) |
| std::string | FindDecisiveFailureMessage (const fs::path &file) |
| std::unordered_map< std::string, std::string > | ReadRobotFailures (const fs::path &folder) |
| std::string | TestNameKey (std::string_view name) |
| std::string | CollapseWhitespace (std::string_view text) |
| Collapses whitespace runs (including newlines) to one space and trims. | |
| std::string | NormalizeFailureMessage (std::string_view message) |
| std::vector< TestRunEntry > | ScanResultsFolder (const fs::path &folder, const ScanProgress &progress) |
| std::vector< FailureGroup > | GroupFailures (const std::vector< TestRunEntry > &entries) |
| TestRunEntry | ReadTestLogSummary (const std::filesystem::path &file) |
| std::string | FindDecisiveFailureMessage (const std::filesystem::path &file) |
| std::unordered_map< std::string, std::string > | ReadRobotFailures (const std::filesystem::path &folder) |
| std::vector< TestRunEntry > | ScanResultsFolder (const std::filesystem::path &folder, const ScanProgress &progress={}) |
Variables | |
| static const std::vector< std::string > | kSenderWords |
| static const std::vector< std::string > | kReceiverWords |
| static const std::vector< std::string > | kActorWords |
| static const std::vector< std::string > | kLabelWords |
| static const std::vector< std::string > | kOutgoingWords |
| static const std::vector< std::string > | kIncomingWords |
| static const std::vector< std::pair< std::string, std::string > > | kProtocolPatterns |
| constexpr std::string_view | kMetaTestCase = "Test Case" |
| File-metadata keys of a safeAPI merged-log header (see SapiLogParser). | |
| constexpr std::string_view | kMetaStatus = "Status" |
| constexpr std::string_view | kMergedLogSuffix = "__merged_logs.txt" |
| File-name suffix of a safeAPI merged test log inside a results folder. | |
| using analyzer::ScanProgress = typedef std::function<bool(std::size_t done, std::size_t total)> |
Called after each scanned log with (done, total); return false to cancel.
|
strong |
How actor send/receive relationships are encoded in the log.
|
strong |
Where TestRunEntry::failureMessage came from.
| Enumerator | |
|---|---|
| None | no message found (or the test did not fail) |
| StepFail | the decisive STEP_FAIL of the log (see BuildTestOutline) |
| RobotXml |
|
|
strong |
|
strong |
| TestOutline analyzer::BuildTestOutline | ( | db::EventsContainer & | events, |
| const TestMarkerRules & | rules = {} |
||
| ) |
Builds the step outline of the first test in events.
TestStep marker, one section per marker, and "Teardown" for the keywords after the last TestExpectation marker (only when that is the last marker). Without TestStep markers everything up to the teardown is one section, "Test".Wait Until Keyword Succeeds); in a passing test every failure counts as recovered.Status (file metadata), else (PASS) / (FAIL) in the TEST_END text.

| std::string analyzer::CollapseWhitespace | ( | std::string_view | text | ) |
Collapses whitespace runs (including newlines) to one space and trims.

| std::vector< SequenceMessage > analyzer::CollectSequenceMessages | ( | db::EventsContainer & | events, |
| const ExchangePattern & | pattern, | ||
| std::size_t | limit | ||
| ) |
Collects the actor-to-actor messages of a Pair exchange pattern.
Only events whose sender AND receiver are real actors yield messages: placeholder values ("internal", "none", …) are skipped and multi-actor values are fanned out into one message per receiver/sender. At most limit messages are returned, in event order.


| std::string analyzer::FindDecisiveFailureMessage | ( | const fs::path & | file | ) |


| std::string analyzer::FindDecisiveFailureMessage | ( | const std::filesystem::path & | file | ) |
Message of the decisive STEP_FAIL of a failing merged log (empty when the log records none, e.g. a suite-setup failure). Reads every line but parses only the robot marker lines (TEST_START / TEST_END / STEP / STEP_FAIL) and hands them to BuildTestOutline, so the choice matches the Test Steps tab.
| std::vector< FailureGroup > analyzer::GroupFailures | ( | const std::vector< TestRunEntry > & | entries | ) |
Groups the FAIL entries that have a message by NormalizeFailureMessage; largest group first, ties in order of first appearance.


| bool analyzer::IsPlaceholderActor | ( | std::string_view | name | ) |
True for values that stand in for "no actor" in a sender/receiver field (e.g. destination=internal on events that are local to their source). Case-insensitive. Such values are not actors and never get a lifeline.

| std::string analyzer::NormalizeFailureMessage | ( | std::string_view | message | ) |
Grouping signature of a failure message: whitespace collapsed and every run of digits replaced by N, so "not received within 20s" and "not received within 40s" fall into one group.


| std::optional< std::int64_t > analyzer::ParseIsoMicros | ( | std::string_view | ts | ) |
"YYYY-MM-DDTHH:MM:SS[.fraction]…" → µs since the epoch. Any zone suffix is ignored: only differences between timestamps of one log are meaningful.

| std::unordered_map< std::string, std::string > analyzer::ReadRobotFailures | ( | const fs::path & | folder | ) |

| std::unordered_map< std::string, std::string > analyzer::ReadRobotFailures | ( | const std::filesystem::path & | folder | ) |
Failure messages Robot Framework wrote next to the logs: test name (see TestNameKey) → message. xunit.xml (<testcase name> / <failure message> or <error message>) is used when it exists, else output.xml (the text of a <test>'s own FAIL <status>). Missing or broken files give an empty map.
| TestRunEntry analyzer::ReadTestLogSummary | ( | const fs::path & | file | ) |


| TestRunEntry analyzer::ReadTestLogSummary | ( | const std::filesystem::path & | file | ) |
Header and time span of one merged log: reads the # header block, the first event line and the last 64 KiB of the file. Never parses the events.
| std::vector< TestRunEntry > analyzer::ScanResultsFolder | ( | const fs::path & | folder, |
| const ScanProgress & | progress | ||
| ) |


| std::vector< TestRunEntry > analyzer::ScanResultsFolder | ( | const std::filesystem::path & | folder, |
| const ScanProgress & | progress = {} |
||
| ) |
Scans every *__merged_logs.txt of folder (not recursive): ReadTestLogSummary for each, FindDecisiveFailureMessage for FAIL logs only, ReadRobotFailures for FAIL logs still without a message.
The result is in run order: by timestamp (ISO-8601 strings of one run share a time zone, so they compare as text), then by file name. The test that ran before entry i is therefore entry i − 1.
Returns an empty vector when progress cancels.
|
static |

| std::vector< std::string > analyzer::SplitActorList | ( | std::string_view | value | ) |
Splits a sender/receiver value naming several actors ("c-west,c-east") into its trimmed, non-empty parts.

| std::string analyzer::TestNameKey | ( | std::string_view | name | ) |
Matching key for test names: lower-case letters and digits only, so the header name "No Container Is Crash-Looping", the xunit name and the file name "No_Container_Is_Crash-Looping" all match.

|
static |
|
static |
|
static |
|
inlineconstexpr |
File-name suffix of a safeAPI merged test log inside a results folder.
|
inlineconstexpr |
|
inlineconstexpr |
File-metadata keys of a safeAPI merged-log header (see SapiLogParser).
|
static |
|
static |
|
static |
|
static |