TGenAI: An LLM-based Approach for Functional End-to-End Test Generation for IoT Systems. Minani, J. B., Trabelsi, I., El Fellah, Y., Sabir, F., Kuradusenge, M., Gu�h�neuc, Y., & Moha, N. Internet of Things Journal (IoTJ), 39:102066, Elsevier, September, 2026. 23 pages.
TGenAI: An LLM-based Approach for Functional End-to-End Test Generation for IoT Systems [pdf]Paper  abstract   bibtex   
Context: The Internet of Things (IoT) includes numerous devices that exchange data across various domains, creating a highly interconnected ecosystem. With such dynamic systems, testing is essential to ensure seamless interaction and verify that they function according to their specifications. Problem: Testing IoT systems is complex and time-consuming due to their dynamic nature. Unlike traditional methods, generating end-to-end (E2E) tests across both device and application layers presents significant challenges. Objective: This paper presents TGenAI, an LLM-based approach to generate tests from use-case specifications (UCS) for E2E testing of IoT systems, with a human-in-the-loop (HITL) to ensure correctness and completeness. Method: TGenAI generates tests from UCS written in the Restricted Use Case Model (RUCM). It starts with an initial prompt, which is optimized using Structure-Aware Multi-objective Metaprompt Optimization (SAMMO) to improve the LLM performance. TGenAI invokes the LLM with the optimized prompt to generate the tests. We use a HITL to evaluate the tests for completeness and correctness and to adjust the generated tests using a mapping table to make them ready for execution. Unlike prior work focusing on models or single devices, we validate E2E flows across devices, gateway, cloud, and application through two deployed IoT case studies (WIMP and EWS-FD). Results: The results show that completeness and correctness vary significantly depending on the selected LLM, ranging from 13% to 100% across both IoT systems. We observed some inconsistencies in the generated tests, but the adjustments required by a HITL are minimal compared to manual generation. The HITL converts LLM outputs into executable tests via a small mapping table and triggers execution on WIMP using our proof-of-concept (PoC) tool. Conclusion: We proposed an approach, TGenAI, for LLM-generated E2E tests that we validated on two deployed IoT systems (WIMP and EWS-FD), demonstrating time and effort savings, while the need for a HITL highlights opportunities for improvement and future research.

Downloads: 0