Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: include more readable mqtt logs in Get Logs keyword #2410

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

reubenmiller
Copy link
Contributor

@reubenmiller reubenmiller commented Nov 3, 2023

Proposed changes

Include a more readable version of the mqtt messages received during a system test by including a separate mqtt log output section in the Robot Framework Get Logs keyword.

The benefits are:

  • Easier to read and see errors by only including the timestamp, topic and message (don't included any additional meta information that is store in the mqtt-logger output, .e.g. hex into.)

The same detailed information is still provided within the journald output (to see the interactions of the mqtt messages with the service log entries), however the messages are more difficult to read and isolate from the log entries for cases where the tester only cares about the mqtt messages being sent.

Example

image

The logs can easily be copied/pasted from the system test report for detailed analysis.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Copy link
Contributor

github-actions bot commented Nov 3, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
356 0 3 356 100 58m49.242999999s

Copy link
Contributor

@albinsuresh albinsuresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for that error handling risk. Of course, the damage would be minimal as this is typically part of the tear down process.

tests/RobotFramework/libraries/ThinEdgeIO/ThinEdgeIO.py Outdated Show resolved Hide resolved
just replace unknown utf8 characters to pre preserve the presence of a message

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller merged commit efd5d33 into thin-edge:main Nov 6, 2023
16 checks passed
@reubenmiller reubenmiller deleted the tests-print-mqtt-logs branch November 6, 2023 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants