[TEST-MOBILE-NET-06] Testing Caching and WebSocket Reconnection on Network Disruption

Testing: Mobile Client

Published

October 14, 2026

NoteTask Brief
  • Components: food_tracker_mobile (Flutter), WebSocket.
  • Tools: Android Emulator (Network Speed/Delay controls), Charles Proxy / Mitmproxy.
  • Task Type: Frontend QA (Stress Testing).
  • Status: Under Analysis

Task Description

It is necessary to test the behavior of the mobile application under unstable internet connection conditions (switching from Wi-Fi to 4G, complete offline mode, elevator mode). The system must correctly restore the WebSocket session and preserve the local product cache.

Step-by-Step Instructions

  1. Testing the “Elevator Mode” Scenario: Forcefully disable the internet connection on the emulator while the fridge screen is actively open.
    • Expected Result: The application must not display a blank white screen or crash. The product inventory list must remain visible based on the local cache layer (SQLite/Hive), and an elegant “No network connection” banner must appear at the top.
  2. Testing Automated Reconnection (Heartbeat): Re-enable the internet connection.
    • Expected Result: The web_socket_channel client must automatically trigger its connection recovery procedure (Reconnection), dispatch a Ping request to the Go backend, and seamlessly refresh the screen state without requiring any user intervention.