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

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 (approximately 4K focal test methods from 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.

Introduction: The IoT Testing Nightmare

Testing Internet of Things (IoT) platforms is significantly more complex than traditional web or mobile applications. An IoT ecosystem is not merely a software application; it is a fragile, multi-layered stack comprising hardware sensors, diverse communication protocols (such as Zigbee, Z-Wave, and MQTT), edge gateways, cloud services, and mobile user interfaces. This structural diversity makes testing particularly difficult, as bugs can emerge from any layer or the interactions between them.

The multi-layered IoT architecture and the corresponding levels of testing required from devices to applications.

While the research community has long recognized the prevalence of IoT bugs, there has been a lack of understanding regarding the actual testing practices and perceptions of the developers building these systems. This paper addresses this gap by investigating current testing methodologies, technical hurdles, and the potential disconnect between code-level testing and developer priorities.

Methodology

The researchers employed a two-pronged mixed-methods approach to gain a comprehensive view of the IoT testing landscape:

  1. Empirical Code Analysis: A semi-automated pipeline was developed to mine the repositories of two major open-source platforms: OpenHAB (Java-based) and HomeAssistant (Python-based). Using a "focal method" approach, the team identified functional methods ($fm$) and their corresponding test methods ($ftm$) via Regular Expressions and Abstract Syntax Trees (ASTs). This enabled the calculation of a test ratio: $ftm / (ftm + fm)$.
  2. Developer Survey: To understand the motivations behind the observed data, the authors surveyed 80 active open-source IoT developers. A systematic open-coding process was used to perform a thematic analysis of their responses.

The scope of the analysis was extensive, covering approximately 37,000 test methods across nearly 13,000 test files within these mature ecosystems.

Key Results and Insights: The Reality of "Testing Debt"

The empirical analysis revealed a staggering "testing debt" within these platforms. OpenHAB exhibited a test ratio of only 0.04, meaning only 4 out of every 100 functional methods had associated tests. While HomeAssistant performed better with a ratio of 0.42, it still showed significant variability, with 65% of its add-ons falling below a 0.5 test ratio.

Disparate Platform Priorities

The study found that testing priorities vary significantly between platforms. HomeAssistant developers tend to focus more on user-facing elements and interactions, whereas OpenHAB developers prioritize rule-based automation and system organization.

Distribution of tested components across Home Assistant and openHAB, highlighting differing platform priorities.

Challenges in the Field

Developers identified several unique hurdles that complicate IoT testing:

  • Unit Testing Dominance: Most testing is concentrated at the unit level. Integration testing, though critical for IoT, is often absent because orchestrating tests across physical hardware in CI/CD pipelines is extremely difficult.
  • Firmware Over-The-Air (FOTA) Friction: Testing how software updates might disrupt or "brick" deployed physical devices remains a major unsolved challenge.
  • The Simulation Gap: While 90% of developers prefer automated testing, they still rely on manual testing to capture real-world edge cases—such as environmental reactions—that current simulators cannot replicate.
  • Security Blind Spots: Despite its critical importance, security testing is frequently neglected due to a lack of specialized IoT security tools.

Conclusion and Future Outlook

The research highlights a critical need for the development of advanced digital twins and simulation environments. Such tools must accurately mimic hardware behavior, network latency, and environmental factors to allow developers to move beyond simple unit tests toward robust, automated integration testing. By bridging the gap between physical reality and software simulation, the IoT community can begin to address the significant testing debt that currently characterizes even the most mature open-source platforms.

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},
}
Figure