[TEST-ANALYTICS-04] End-to-End Event Generation Verification for Process Mining
Testing: Analytics and ClickHouse
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
- Emulating the “WASTE” Business Scenario: Initiate a product disposal request through a test gRPC/HTTP client to simulate sending items to the trash bin.
- ClickHouse Log Verification (Expected Result):
- Execute a verification SQL query against the log table in ClickHouse.
- Ensure that a new record featuring the
Waste_Droppedevent has successfully appeared in the database. - Validate the payload structure:
case_idmust not be empty, and thetimestampmust strictly comply with the RFC3339 Nano format.
- Looping Scenario Verification (
Inventory_Viewed): Simulate 5 sequential fridge screen views without performing any mutating actions. Verify that ClickHouse successfully logged 5 distinctInventory_Viewedevents containing an identicalcase_id, confirming that the “Passive Browsing” loop pattern is correctly detected.