[TEST-ANALYTICS-04] End-to-End Event Generation Verification for Process Mining

Testing: Analytics and ClickHouse

Published

October 14, 2026

NoteTask Brief
  • Components: product_process_service (Go), ClickHouse (Event Log).
  • Tools: ClickHouse Go Client, SQL, Docker Environment.
  • Task Type: QA / Data Validation.
  • Status: Under Analysis

Task Description

Every user action in the interface must leave a strict digital footprint in the event log. An incorrect format or a missing event disrupts the downstream analytical Process Mining algorithms. It is necessary to write automated tests that verify synchronous event records are pushed to ClickHouse whenever a user completes cooking or disposal workflows.

Step-by-Step Instructions

  1. Emulating the “WASTE” Business Scenario: Initiate a product disposal request through a test gRPC/HTTP client to simulate sending items to the trash bin.
  2. ClickHouse Log Verification (Expected Result):
    • Execute a verification SQL query against the log table in ClickHouse.
    • Ensure that a new record featuring the Waste_Dropped event has successfully appeared in the database.
    • Validate the payload structure: case_id must not be empty, and the timestamp must strictly comply with the RFC3339 Nano format.
  3. Looping Scenario Verification (Inventory_Viewed): Simulate 5 sequential fridge screen views without performing any mutating actions. Verify that ClickHouse successfully logged 5 distinct Inventory_Viewed events containing an identical case_id, confirming that the “Passive Browsing” loop pattern is correctly detected.