Characterizing Tests in IoT Software: Practices, Challenges and Opportunities

· Source: cs.SE updates on arXiv.org · Field: Technology & Digital — Software Development & Engineering, Internet of Things (IoT) & Connected Devices · Depth: Expert, extended

Summary

An empirical study characterized testing practices in open-source Internet of Things (IoT) software, analyzing 824 projects and conducting in-depth coverage and mutation analysis on 37 runnable repositories. The research found that while IoT software often includes a considerable number of tests, their overall effectiveness remains limited, with average statement coverage of 65.2%, branch coverage of 53.4%, and a mutation score of 39.9%. A key finding is that over half (51.4%) of uncovered code segments stem from challenges in managing complex interactions with external dependencies, particularly network communication scenarios. The study also revealed that 76.04% of mock objects in IoT tests simulate network APIs, aligning directly with these identified testing hurdles and suggesting mocking as a crucial solution for enhancing test coverage.

Key takeaway

For software engineers developing IoT systems, you should prioritize robust mocking strategies to address the pervasive challenges of external dependencies, especially network communications. Your test suites must effectively simulate diverse protocols and device interactions. Consider exploring mock object migration from well-tested open-source projects to enhance coverage and reduce manual effort in creating context-specific test doubles.

Key insights

IoT software testing effectiveness is limited by complex external dependencies, especially network communications, making mock objects crucial.

Principles

Method

The study conducted static analysis on 824 IoT projects, then dynamic coverage and mutation analysis on 37 runnable projects. It used open coding for uncovered code and closed coding for mock object roles and simulated dependencies.

In practice

Topics

Best for: AI Scientist, Research Scientist, Software Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.