IoT Architecture
The Internet of Things connects physical devices to the digital world, creating systems that sense, communicate, and act. IoT testing spans the entire stack — from embedded firmware to cloud platforms, with unique challenges at every layer.
IoT Stack
Communication Protocols
| Protocol | Range | Power | Use Case |
|---|---|---|---|
| Bluetooth LE | 10-100m | Very Low | Wearables, beacons |
| WiFi | 50-100m | Medium | Smart home |
| Zigbee/Z-Wave | 10-100m | Low | Home automation mesh |
| LoRaWAN | 2-15km | Very Low | Agriculture, utilities |
| NB-IoT/LTE-M | Cellular | Low-Medium | Asset tracking, smart city |
| MQTT | Over TCP/IP | Varies | Cloud messaging |
IoT Testing Focus Areas
Connectivity Testing
IoT devices operate in unreliable network conditions:
- Connection establishment and teardown timing
- Behavior during network loss (offline mode, data buffering)
- Reconnection after network restoration (session resume)
- Protocol fallback (WiFi → cellular → store-and-forward)
- Range testing for wireless protocols (BLE, Zigbee)
Power and Battery Testing
Battery life is critical for many IoT devices:
- Power consumption in active, idle, and deep sleep modes
- Wake-up trigger accuracy (timer, sensor event, remote command)
- Battery level reporting accuracy
- Low battery behavior (graceful degradation, alerts)
- Charging cycle testing (if rechargeable)
Firmware Testing
Embedded firmware has unique constraints:
- Memory-constrained testing (kilobytes, not gigabytes)
- Real-time response requirements
- Hardware abstraction layer testing
- Watchdog timer behavior
- Boot sequence and initialization
OTA (Over-the-Air) Update Testing
Firmware updates must work reliably:
- Full update and delta/patch update
- Power loss during update (must resume or rollback)
- Version compatibility (new firmware with old cloud API)
- Rollback capability if update fails
- Update scheduling and bandwidth management for fleet updates
IoT Security Testing
IoT devices are frequent attack targets:
- Default credential scanning (no hardcoded passwords)
- Communication encryption (TLS for MQTT, HTTPS for REST)
- Device authentication and authorization
- Physical security (tamper detection, debug port protection)
- Firmware extraction resistance
- Privacy: data minimization and consent management
Advanced IoT Testing
Edge Computing Testing
Processing data at the edge reduces latency and cloud costs:
- Local inference accuracy vs. cloud inference
- Edge-to-cloud synchronization when connectivity is restored
- Edge device resource management (CPU, memory, storage)
- Failover between edge and cloud processing
Fleet Management Testing
Managing thousands or millions of devices:
- Device provisioning and onboarding at scale
- Fleet-wide firmware update rollout (staged deployment)
- Device health monitoring and alerting
- Remote diagnostics and troubleshooting
- Device decommissioning and data wiping
Interoperability Testing
IoT ecosystems include devices from multiple vendors:
- Matter/Thread protocol compliance for smart home
- Cross-vendor device communication
- Hub/gateway compatibility
- Voice assistant integration (Alexa, Google Home, Siri)
Hands-On Exercise
Design a test plan for a smart thermostat:
- Connectivity: Test WiFi connection, disconnection handling, and reconnection
- Sensor accuracy: Verify temperature readings within specified tolerance
- OTA update: Test firmware update including power-loss-during-update scenario
- Mobile app: Test pairing, remote control, and schedule programming
- Security: Verify encrypted communication and no default credentials
Solution Guide
Connectivity tests:
- Connect to WiFi → verify cloud connection established within 10 seconds
- Disconnect WiFi → verify thermostat continues operating on last schedule
- Restore WiFi → verify buffered data syncs to cloud, no data loss
OTA update tests:
- Initiate update → verify download, verification, installation, reboot
- Pull power during installation → verify device recovers on next boot
- Update to incompatible firmware → verify rollback to previous version
Pro Tips
- Test with real hardware in real environments — emulators miss physical-world issues
- Automate device fleet testing — manual testing does not scale to thousands of devices
- Test power consumption continuously — firmware changes can dramatically increase battery drain
- Always test OTA with power interruption — the one scenario you do not test will happen in the field
- Security testing must cover physical access — IoT devices are often in uncontrolled environments
Key Takeaways
- IoT testing spans the full stack from embedded firmware to cloud platforms
- Connectivity reliability and power management are unique IoT testing challenges
- OTA firmware updates must be bulletproof — failed updates can brick devices permanently
- IoT security must address both digital and physical attack surfaces