Testing Practices, Challenges, and Developer Perspectives in Open-Source IoT Platforms

Daniel Rodríguez-Cárdenas, Safwat Ali Khan, Prianka Mandal, Adwait Nadkarni, Kevin Moran, Denys Poshyvanyk

This paper, recently published by researchers from William & Mary, George Mason University, and the University of Central Florida, provides a first-of-its-kind look into the "wild west" of Internet of Things (IoT) software testing. By combining large-scale code mining with a developer survey, the authors uncover a significant gap between the theoretical importance of IoT reliability and the actual testing practices on the ground.

TL;DR

Despite the critical nature of smart home ecosystems, popular open-source IoT platforms like OpenHAB and HomeAssistant suffer from a massive "testing debt," with some platforms testing as little as 4% of their functional code. While developers prioritize automated unit testing, they struggle with unique IoT hurdles like device heterogeneity, flaky firmware updates, and the inability to simulate real-world physical environments.

What Problem Does This Paper Address?

Testing IoT platforms is a nightmare compared to traditional web or mobile apps. An IoT ecosystem isn't just a piece of software; it’s a fragile stack of hardware sensors, diverse communication protocols (Zigbee, Z-Wave, MQTT), edge gateways, cloud services, and mobile UIs.

The research community has long known that IoT bugs are common, but we haven't known how (or if) the people building these systems actually test them. This paper addresses this knowledge gap by investigating the current state of testing practices, the specific technical challenges developers face, and the disconnect between what is tested in code versus what developers perceive as important.

Methods

The authors employed a two-pronged "mixed-methods" approach:

  1. Empirical Code Analysis: They developed a semi-automated pipeline to mine the repositories of OpenHAB and HomeAssistant. They used a "focal method" approach—identifying functional methods ($fm$) and their corresponding test methods ($ftm$) using Regular Expressions and Abstract Syntax Trees (ASTs). This allowed them to calculate a test ratio: $ftm / (ftm + fm)$.
  2. Developer Survey: They surveyed 80 active open-source IoT developers. Using a systematic "open-coding" process, they performed a thematic analysis of the responses to understand the why behind the numbers found in the code analysis.

Datasets

The study focused on two of the largest and most mature open-source IoT platforms:

  • OpenHAB: Primarily Java-based, known for its robust rule engine.
  • HomeAssistant: Primarily Python-based, famous for its massive library of third-party integrations (add-ons).
  • The Scope: The analysis covered approximately 37,000 test methods across nearly 13,000 test files.

Key Insights and Ideas

  • The "Testing Debt" is Real: There is a staggering disparity in testing maturity. OpenHAB showed a test ratio of only 0.04, meaning for every 100 functional methods, only 4 had associated tests. HomeAssistant fared better at 0.42, but still showed high variability.
  • Unit Testing is King (by default): Most testing is concentrated at the unit level. Integration testing—which is arguably more important for IoT—is largely absent because it is incredibly difficult to orchestrate tests across physical hardware in a CI/CD pipeline.
  • The FOTA Friction: Developers identified Firmware Over-The-Air (FOTA) updates as a primary source of pain. Testing how a software update might "brick" or disrupt a physical device that is already deployed is a major unsolved challenge.
  • Automation vs. Intuition: While 90% of developers prefer automated testing for efficiency, they still advocate for manual testing to capture "human intuition" and "real-world edge cases" (e.g., how a sensor reacts to actual weather or low-power states) that current simulators can't replicate.

Key Results

  • Finding 1: Only 3 out of 406 OpenHAB add-ons surpassed a 0.5 test ratio. In HomeAssistant, 65% of add-ons fell below the 0.5 threshold.
  • Finding 2: Platform priorities differ. HomeAssistant developers focus on user-facing elements (UI/Interactions), while OpenHAB developers prioritize rule-based automation and system organization.
  • Finding 3: Developers identified compatibility across the vast array of IoT devices as their #1 challenge.
  • Finding 4: Security testing is a major blind spot. Despite its importance, it is often neglected due to the lack of IoT-specific security testing tools.

Limitations and Future Work

The authors acknowledge a few key limitations:

  • Open-Source Bias: The findings are based on open-source projects; proprietary industrial IoT platforms might have different (though not necessarily better) internal standards.
  • Manual Labeling Subjectivity: While they used multiple coders to ensure agreement, the categorization of "test purpose" involves some level of human interpretation.
  • The Simulation Gap: A recurring theme was the lack of tools to simulate "physicality."

Future Work: The paper calls for the development of better digital twins and simulation environments that can accurately mimic hardware behavior, network latency, and environmental factors, allowing developers to move beyond simple unit tests and into robust, automated integration testing.

Summary updated

Abstract

As the popularity of Internet of Things (IoT) platforms grows, users gain unprecedented control over their homes, health monitoring, and daily task automation. However, the testing of software for these platforms poses significant challenges due to their diverse composition, e.g., common smart home platforms are often composed of varied types of devices that use a diverse array of communication protocols, connections to mobile apps, cloud services, as well as integration among various platforms. This paper is the first to uncover both the practices and perceptions behind testing in IoT platforms, particularly open-source smart home platforms. Our study is composed of two key components. First, we mine and empirically analyze the code and integrations of two highly popular and well-maintained open-source IoT platforms, OpenHab and HomeAssitant. Our analysis involves the identification of functional and related test methods based on the focal method approach. We find that OpenHab has only 0.04 test ratio ($\approx 4K$ focal test methods from $\approx 76K$ functional methods) in Java files, while HomeAssitant exhibits higher test ratio of $0.42$, which reveals a significant dearth of testing. Second, to understand the developers' perspective on testing in IoT, and to explain our empirical observations, we survey 80 open-source developers actively engaged in IoT platform development. Our analysis of survey responses reveals a significant focus on automated (unit) testing, and a lack of manual testing, which supports our empirical observations, as well as testing challenges specific to IoT. Together, our empirical analysis and survey yield 10 key findings that uncover the current state of testing in IoT platforms, and reveal key perceptions and challenges. These findings provide valuable guidance to the research community in navigating the complexities of effectively testing IoT platforms.
BibTeX
@inproceedings{rodriguezcardenas2025testing,
  author = {Daniel Rodríguez-Cárdenas and Safwat Ali Khan and Prianka Mandal and Adwait Nadkarni and Kevin Moran and Denys Poshyvanyk},
  title = {{Testing Practices, Challenges, and Developer Perspectives in Open-Source IoT Platforms}},
  booktitle = {ICST},
  year = {2025},
  doi = {10.1109/icst62969.2025.10988986},
}

Loading related content...

Figure