How to test an IoT device?

How to test an IoT device? Which can't receive 'normal' inputs?

07-07-2020 door Roy de Kleijn

Testsmith (in collaboration with Specialisterren) is fortunate to test a brand-new IoT device! The solution is obviously out of hardware and software, all connected to the internet. I can’t go into the details of this awesome IoT device, because it is confidential. However, I can describe some context and approach to how I tested it. The hardware exists out of a Raspberry PI (or equivalent) running a webserver, sensor board to receive different measures and a keypad. There are more things involved, but they are irrelevant to this blog post.

The web interface served by the webserver cannot receive “normal” keyboard and mouse inputs. Obviously, the end-user can also not utilize a keyboard and mouse while using the IoT device. The end-user is, however, allowed to use the keypad to navigate through menus and settings. So, I connected an Arduino Nano to simulate key presses on the keypad. I wrote some firmware that could recognize the different instructions. Establishing serial communication from a test framework is hard, so I wrote a REST API for easier control of the Arduino. Controlling the user interface of the IoT device was solved!

IoT device

The next thing was to read the different screens. The web interface is a webpage that is only accessible from the Raspberry PI (or equivalent). So, I installed Selenium Grid on the Raspberry PI. Now, I’m able to interrogate the web interface from our computer running the tests.

This is an excellent assignment that brings together different technical aspects. Imagine automating your smart thermostat or smart refrigerator.

Delen: