How would you test an IoT device through offline periods and repeated reconnects?
Answer
Vary outage length, packet loss, DNS, time validity and network changes while producing local events. Verify bounded retry and backoff, local operation, queue capacity, ordering, duplicate handling and reconciliation after reconnect. The device should not exhaust battery or storage, and the backend should distinguish delayed data from current state.
Strong answer includes
- covers local behaviour and backend reconciliation
- checks queue bounds, ordering and duplicates
- includes power impact of retry behaviour
Practical example
A sensor node stores readings locally during a three-day network outage and successfully reconnects, but the reconnect test only checked that the data arrived, not that it arrived in order. The backend timestamps events by receipt time rather than device time, so the three days of backlog appear to happen in the wrong order on a dashboard, temporarily showing an impossible sequence of alarm states.