agentleFS
mejbaurbaharmejbaurbahar/software-tester-skills/skills/iot-embedded-testing/SKILL.md

iot-embedded-testing

Skill1 starsChanged 53 days agoMITView on GitHub

Use when testing IoT devices, firmware and embedded systems — hardware-in-the-loop, simulators/emulators, MQTT/BLE/Zigbee/LoRa protocols, OTA updates, power/battery, sensor edge cases, constrained resources, connectivity loss, and device fleet security.

The file

Files
SKILL.md

IoT & Embedded Systems Testing

Constraints (memory, power, connectivity, real-time deadlines) and the physical world make failure modes different — and recall costly. Test on host → emulator → hardware-in-the-loop → field.

Test levels

LevelWhatTools
Host unit (x86)Business logic compiled natively, HAL mockedUnity/CMock, Ceedling, GoogleTest, CppUTest, Rust #[test]
Simulation/emulationFirmware on virtual MCU/boardQEMU, Renode, Wokwi, Zephyr native_sim, Arm FVP
HILReal board + rigs (relays, signal generators, sensors)pytest + pyserial/pyocd, Robot Framework, Labgrid, OpenOCD/JTAG, Saleae logic analyzer
IntegrationDevice ↔ gateway ↔ cloudMQTT broker (Mosquitto), device shadow/twin tests, LocalStack IoT
System/fieldReal environment, fleet pilotsStaged OTA rings, telemetry dashboards

Behavior checklist

  • Sensors: out-of-range, stuck-at, noise/spikes, drift, calibration, missing sensor, debouncing, sampling jitter, ADC saturation.
  • Real-time: deadlines met under worst-case load; interrupt latency; priority inversion; watchdog resets & recovery; stack/heap high-water marks (memory-leak-resource-testing).
  • State & power: cold boot, warm reset, brownout, power loss mid-flash-write (config not corrupted), sleep/wake current (µA budget), battery curve at temperature, low-battery behavior.
  • Connectivity: offline buffering & backpressure, reconnect with backoff, QoS 0/1/2 semantics, retained/LWT messages, clock without NTP, NAT/firewall, cellular roaming, BLE pairing/bonding & range, Wi-Fi provisioning failure paths.
  • OTA updates: signed images verified; A/B partitions with automatic rollback on failed boot; power cut mid-update; downgrade protection; delta updates; staged rollout; version skew between device and cloud API.
  • Protocols: fuzz parsers (fuzz-testing), malformed frames, MTU limits, endianness, CRC failures, duplicate/out-of-order packets.
  • Security: secure boot chain, debug ports (JTAG/UART) locked, unique device identity/keys (no shared secrets), TLS with cert pinning/rotation, encrypted flash/secrets, least-privilege services; supply-chain SBOM (supply-chain-dependency-testing); aligned to ETSI EN 303 645 / IEC 62443 / OWASP IoT Top 10.
  • Environmental: temperature/humidity, EMI, vibration (lab/certification).
  • Fleet: 1 → 10k devices: registration storms, thundering-herd reconnect after outage, config drift, telemetry cost, remote diagnostics, decommission & data wipe.

Example: HIL test with pytest

def test_bootloader_rolls_back_on_bad_image(dut, relay, fw_bad):
    dut.flash(fw_bad); relay.power_cycle()
    dut.wait_for("Rollback to slot A", timeout=20)
    assert dut.version() == "1.4.2"

MQTT smoke: mosquitto_sub -h $B -t 'dev/+/telemetry' -v while mosquitto_pub simulates commands.

Related

chaos-resilience-testing, security-testing, performance-testing, event-driven-messaging-testing, installation-upgrade-testing

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.