[FEATURE] Adding Realtime Log feature to CLI#81
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a real-time log display feature for the CLI, utilizing the "rich" library to provide live feedback during specific test execution steps. The implementation includes a new RealtimeLogDisplay manager, integration with the websocket communication layer, dependency updates in pyproject.toml, and a suite of unit tests. Review feedback suggests several optimizations, including more robust timestamp handling, the removal of dead code, and performance improvements for the rendering logic.
80800e9 to
4b501f0
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces real-time log streaming for test runs, enabling users to view live logs in a browser interface via a new HTTP server and Server-Sent Events (SSE). The implementation includes a dedicated HTML/JavaScript log viewer, a LogStreamHandler for coordination, and updates to the CLI to display the viewer URL and manage the streaming lifecycle. Feedback focuses on improving efficiency by streaming log downloads in chunks to prevent memory exhaustion and replacing hardcoded values for the port and streaming enablement with configuration-based settings.
Also fixing the downloaded file to show breakline properly.
Also fixing incomplete log streaming
Fix: project-chip/certification-tool#944
Description
This feature adds a real-time web-based log viewer for Matter certification tests executed via CLI. It enables verifiers to view and analyze test execution logs in real-time through a browser interface, addressing critical certification requirements.
Problem Statement
Current Limitation
During test case execution, some critical log messages are only visible in the TH-CLI after the test completes. This prevents verifiers from:
Impact
Solution
A browser-based real-time log streaming system that mirrors the existing camera feature architecture:
Key Features
🔴 Real-Time Streaming
🎨 Modern Web Interface
🔍 Advanced Filtering & Search
💾 Download Functionality
test_run_logs_2026-05-11-17-31-43.log⚡ Performance Optimized
🏗️ Architecture
Components
File Structure
🚀 Usage
Starting Tests with Log Streaming
Disabling Test Execution Log Streaming
CLI Output
Accessing the Log Viewer
http://192.168.1.100:8998)Log Viewer Interface
Header:
Controls:
Filter Buttons:
🧪 Testing
Manual Testing Checklist
📸 Screenshots
Log Viewer Interface