IoT In The Matrix: Mocking External Dependencies For IoT Systems Using Physical Hardware

Using software mocks as stand-ins for external dependencies is a well-established practice for software testing. However, mocking subsystems in Internet of Things (IoT) devices that interface with the physical world often isn't practical, because their behavior is too complex or opaque. This often necessitates resorting to the use of lab test instruments by specialists or field testing with real hardware, which can be difficult and expensive.

However, there have been quite a lot of advancements in hobbyist test instruments, electronics modules and open-source software; such that, with a little hardware savvy, and not too much cost, simulating some of these interfaces has become viable for teams with limited resources. Our team has been able to apply this, using commercial off-the-shelf (COTS) hardware to mock most of the physical-world interfaces of a IoT device, such that it's unaware it's not connected to reality.

In this talk, we cover some of the background hardware knowledge necessary, how it can be applied to simulating some of the more complex interfaces, e.g., Wi-Fi, global navigation satellite systems (GNSS), power sources etc. Additionally, we will cover the costs, advantages and limitations of going with hardware-based mocking, and review some of the difficulties our team encountered along the way.

Learning objectives include:

  • How to use hobbyist electronic modules and tools to mock physical-world interfaces for IoT/embedded systems, aiding in both manual and automated testing.
  • Understanding of essential electronics and radio frequency (RF) concepts, such as frequency, power level, and RF leakage, which are crucial for creating effective mocks.
  • Practical tips for collaborating with electrical engineering colleagues, and understand the practical application of mocking techniques for interfaces like Wi-Fi, GNSS, and battery interfaces, including the justification for these efforts, electrical compatibility considerations, necessary software, and potential challenges such as RF leakage.

Jovan Araiza

Jovan Araiza is a software engineer with 4 years of experience testing IoT software and hardware at Impinj. He has experience testing every layer from web UI down to embedded microcontrollers in IoT devices. He graduated with a bachelors degree in Computer Science from Washington State University in 2019.


Author profile pictureBartholomew Hsu

Bartholomew Hsu is an experienced tester who specializes in IoT embedded devices and network services. He is currently with Impinj, Inc. performing testing for UHF RFID readers and gateways. He received his education in computer engineering from the University of Michigan.


Author profile pictureJeff Borg

Jeff Borg currently works as an SDET testing IoT firmware. His bachelors' degree (1994) is in Electrical Engineering and his experience includes 20+ years of board level circuit design, including RF circuits. Combining this with significant software coursework at the University of Washington, Jeff contributes in an environment where both disciplines are useful.